Skip to content

Instantly share code, notes, and snippets.

@ariya
Created Oct 30, 2011
Embed
What would you like to do?
testing parse-js from UglifyJS
[
"toplevel",
[
[
{
"name": "defun",
"start": {
"type": "name",
"value": "answer",
"line": 1,
"col": 9,
"pos": 85,
"nlb": false,
"comments_before": []
},
"end": {
"type": "punc",
"value": "}",
"line": 1,
"col": 32,
"pos": 108,
"nlb": false,
"comments_before": []
}
},
"answer",
[],
[
[
{
"name": "return",
"start": {
"type": "keyword",
"value": "return",
"line": 1,
"col": 20,
"pos": 96,
"nlb": false,
"comments_before": []
},
"end": {
"type": "punc",
"value": ";",
"line": 1,
"col": 29,
"pos": 105,
"nlb": false,
"comments_before": []
}
},
[
{
"name": "num",
"start": {
"type": "num",
"value": 42,
"line": 1,
"col": 27,
"pos": 103,
"nlb": false,
"comments_before": []
},
"end": {
"type": "num",
"value": 42,
"line": 1,
"col": 27,
"pos": 103,
"nlb": false,
"comments_before": []
}
},
42
]
]
]
]
]
]
/* Answer to the Ultimate Question of Life, the Universe, and Everything */
function answer() { return 42; }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment