Skip to content

Instantly share code, notes, and snippets.

@aslushnikov
Created April 7, 2015 21:13
Show Gist options
  • Save aslushnikov/9f2aa0d3a9141741aafa to your computer and use it in GitHub Desktop.
Save aslushnikov/9f2aa0d3a9141741aafa to your computer and use it in GitHub Desktop.
V8 AST example 2
function test(a, b, c) { return 1; }
{
"type": "FunctionLiteral",
"position": 0,
"declarations": [
{
"type": "FunctionDeclaration",
"position": 0,
"fun": {
"type": "FunctionLiteral",
"position": 0,
"declarations": [],
"body": [
{
"type": "ReturnStatement",
"position": 25,
"expression": {
"type": "Literal",
"position": 32
}
}
]
}
}
],
"body": []
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment