Skip to content

Instantly share code, notes, and snippets.

@sobitp59
Created March 10, 2023 12:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sobitp59/2edf4ade0a749dd5be9c2a5e4c118e16 to your computer and use it in GitHub Desktop.
Save sobitp59/2edf4ade0a749dd5be9c2a5e4c118e16 to your computer and use it in GitHub Desktop.
Abstract Syntax Tree
{
"type": "Program",
"body": [
{
"type": "VariableDeclaration",
"declarations": [
{
"type": "VariableDeclarator",
"id": {
"type": "Identifier",
"name": "hw"
},
"init": {
"type": "Literal",
"value": "hello world",
"raw": "'hello world'"
}
}
],
"kind": "const"
},
{
"type": "ExpressionStatement",
"expression": {
"type": "CallExpression",
"callee": {
"type": "MemberExpression",
"computed": false,
"object": {
"type": "Identifier",
"name": "console"
},
"property": {
"type": "Identifier",
"name": "log"
}
},
"arguments": [
{
"type": "Identifier",
"name": "hw"
}
]
}
}
],
"sourceType": "script"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment