研究调查问卷:请告诉我们您使用 Blockly 的体验
开始调查问卷
blockly >ASTNode
ASTNode 类
用于 AST 节点的类。建议您使用某个 createNode 方法,而不是直接创建节点。
Signature:
export declare class ASTNode
构造函数
属性
方法
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2024-08-21。
[null,null,["最后更新时间 (UTC):2024-08-21。"],[[["The `ASTNode` class represents a node in the Abstract Syntax Tree (AST) of Blockly blocks and provides methods to navigate and manipulate the tree."],["It offers static methods for creating AST nodes for various Blockly components like blocks, fields, inputs, connections, buttons, stacks, and workspaces."],["`ASTNode` instances store location information, allowing retrieval of the associated Blockly element and its type."],["Navigation methods like `next()`, `prev()`, `in()`, and `out()` enable traversal of the AST structure relative to the current node."],["The `getLocation()` method retrieves the underlying Blockly element, while `getType()` identifies the node's type within the AST."]]],[]]