AST
{
"kind": "program",
"children": [
// array of nodes
]
}Nodes
{
"kind": "node name",
"loc": {
""
},
// the location node
"loc": {
"source": "original source code of the node",
"start": {
"line": 1, // 1 based
"column": 0, // 0 based
"offset": 0 // offset from the source code
},
"end": {
// same structure as start
}
},
"leadingComments": [
// array of comments nodes
]
}Nodes hierarchy
AST
asT.swapLocations()
asT.resolvePrecedence()
asT.prepare(kind, parser) ⇒ function
functionLast updated
Was this helpful?