AstNode
Node → loreline.AstNode (Class) → NBeatDecl, NBlock, NCharacterDecl, NChoiceOption, NChoiceStatement, NDialogueStatement, NExpr, NIfStatement, NImportStatement, NInsertion, NObjectField, NStateDecl, NTextStatement, NTransition, Script
Base class for AST nodes that can have associated comments. Extends Node with support for leading and trailing comments.
Instance Members
Comments that appear before this node.
Comments that appear after this node.
type(): String| Returns |
|---|
| String |
eachComment(handleComment: Function): Void| Name | Type |
|---|---|
handleComment |
Function |
each(handleNode: Function): Void| Name | Type |
|---|---|
handleNode |
Function |
toJson(): DynamicConverts the node and its comments to a JSON representation.
| Returns | Description |
|---|---|
| Dynamic | Dynamic object containing node data and associated comments |
new(id: NodeId, pos: Position, ?leadingComments: Array<Comment>, ?trailingComments: Array<Comment>): VoidCreates a new node that supports comments.
| Name | Type | Default | Description |
|---|---|---|---|
id |
NodeId | ||
pos |
Position | Position in source where this node appears | |
leadingComments |
Array<Comment> | (optional) | Optional array of comments appearing before the node |
trailingComments |
Array<Comment> | (optional) | Optional array of comments appearing after the node |
Metadata
| Name | Parameters |
|---|---|
:hxGen |
- |