Script
Represents the root node of a Loreline script AST.
Static Members
Reconstructs a Script from its JSON representation.
| Name |
Type |
Description |
json |
Dynamic |
The JSON object (as returned by script.toJson()) |
| Returns |
Description |
| Script |
The reconstructed Script |
Instance Members
The detected indentation size of the source (e.g., 2 or 4 spaces).
The file path this script was parsed from.
May be null if the script was parsed without a file path.
Array of top-level declarations in the script.
Converts the script to a JSON representation.
| Returns |
Description |
| Dynamic |
Dynamic object containing all script data |
eachExcludingImported(handleNode: Function): Void
| Name |
Type |
handleNode |
Function |
each(handleNode: Function): Void
| Name |
Type |
handleNode |
Function |
Creates a new script root node.
| Name |
Type |
Description |
id |
NodeId |
The node id of this script |
pos |
Position |
Position in source where this script starts |
body |
Array<AstNode> |
Array of top-level declarations |