研究调查问卷:请告诉我们您使用 Blockly 的体验
开始调查问卷
blockly > BasicCursor > validNode_
BasicCursor.validNode_() 方法
决定要遍历哪些节点以及要跳过哪些节点。目前,它会跳过输出、堆栈和工作区节点。
Signature:
protected validNode_(node: ASTNode | null): boolean;
参数
参数 |
类型 |
说明 |
节点 |
ASTNode | null |
要检查其是否有效的 AST 节点。 |
返回:
布尔值
如果应访问该节点,则为 true,否则为 false。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2024-11-08。
[null,null,["最后更新时间 (UTC):2024-11-08。"],[[["The `validNode_` method within the `BasicCursor` class determines which nodes are traversed during navigation."],["It skips specific node types like output, stack, and workspace nodes for optimized traversal."],["This method accepts an ASTNode as input and returns a boolean indicating if the node should be visited."]]],["The `validNode_` method, part of the `BasicCursor` class, determines which Abstract Syntax Tree (AST) nodes should be traversed. It accepts an AST node as input and returns a boolean value. A `true` return indicates the node should be visited, while `false` means it should be skipped. The method currently skips nodes of type output, stack, and workspace. It takes an `ASTNode` or `null` as an argument.\n"]]