Last active
January 13, 2017 14:43
-
-
Save fokusferit/e7e25234a06cb42e3aafd2db0ffd2bc1 to your computer and use it in GitHub Desktop.
A basic AST for a one line ES6 code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"type": "Program", | |
"start": 0, | |
"end": 23, | |
"body": [ | |
{ | |
"type": "VariableDeclaration", | |
"start": 0, | |
"end": 22, | |
"declarations": [ | |
{ | |
"type": "VariableDeclarator", | |
"start": 4, | |
"end": 21, | |
"id": { | |
"type": "Identifier", | |
"start": 4, | |
"end": 9, | |
"name": "array" | |
}, | |
"init": { | |
"type": "ArrayExpression", | |
"start": 12, | |
"end": 21, | |
"elements": [ | |
{ | |
"type": "Literal", | |
"start": 13, | |
"end": 14, | |
"value": 1, | |
"raw": "1" | |
}, | |
{ | |
"type": "Literal", | |
"start": 15, | |
"end": 16, | |
"value": 2, | |
"raw": "2" | |
}, | |
{ | |
"type": "Literal", | |
"start": 17, | |
"end": 20, | |
"value": "b", | |
"raw": "'b'" | |
} | |
] | |
} | |
} | |
], | |
"kind": "let" | |
} | |
], | |
"sourceType": "script" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment