Skip to content

Instantly share code, notes, and snippets.

@mduvall
Created December 18, 2013 08:05
Show Gist options
  • Save mduvall/8018844 to your computer and use it in GitHub Desktop.
Save mduvall/8018844 to your computer and use it in GitHub Desktop.
{ type: 'Program',
body:
[ { type: 'VariableDeclaration',
declarations:
[ { type: 'VariableDeclarator',
id: { type: 'Identifier', name: 'obj', range: [ 4, 7 ] },
init:
{ type: 'ObjectExpression',
properties:
[ { type: 'Property',
key: { type: 'Identifier', name: 'a', range: [ 37, 38 ] },
value:
{ type: 'FunctionExpression',
id: null,
params: [],
defaults: [],
body:
{ type: 'BlockStatement',
body:
[ { type: 'VariableDeclaration',
declarations:
[ { type: 'VariableDeclarator',
id: { type: 'Identifier', name: 'foo', range: [ 69, 72 ] },
init: { type: 'Literal', value: 1, raw: '1', range: [ 75, 76 ] },
range: [ 69, 76 ] } ],
kind: 'var',
range: [ 65, 77 ],
trailingComments: [ { type: 'Line', value: ' hello', range: [ 78, 86 ] } ] } ],
range: [ 55, 92 ] },
rest: null,
generator: false,
expression: false,
range: [ 40, 92 ] },
kind: 'init',
range: [ 37, 92 ],
leadingComments: [ { type: 'Line', value: ' Pre-a comment', range: [ 16, 32 ] } ] },
{ type: 'Property',
key: { type: 'Identifier', name: 'b', range: [ 98, 99 ] },
value:
{ type: 'FunctionExpression',
id: null,
params: [],
defaults: [],
body: { type: 'BlockStatement', body: [], range: [ 116, 124 ] },
rest: null,
generator: false,
expression: false,
range: [ 101, 124 ] },
kind: 'init',
range: [ 98, 124 ],
leadingComments: [ { type: 'Line', value: ' hello', range: [ 78, 86 ] } ] } ],
range: [ 10, 126 ] },
range: [ 4, 126 ] } ],
kind: 'var',
range: [ 0, 127 ],
trailingComments: [ { type: 'Line', value: ' comment above', range: [ 129, 145 ] } ] },
{ type: 'FunctionDeclaration',
id: { type: 'Identifier', name: 'bar', range: [ 155, 158 ] },
params: [],
defaults: [],
body:
{ type: 'BlockStatement',
body:
[ { type: 'VariableDeclaration',
declarations:
[ { type: 'VariableDeclarator',
id: { type: 'Identifier', name: 'i', range: [ 192, 193 ] },
init: { type: 'Literal', value: 1, raw: '1', range: [ 196, 197 ] },
range: [ 192, 197 ] } ],
kind: 'var',
range: [ 188, 198 ],
leadingComments: [ { type: 'Line', value: ' comment below', range: [ 167, 183 ] } ] } ],
range: [ 161, 201 ] },
rest: null,
generator: false,
expression: false,
range: [ 146, 201 ],
leadingComments: [ { type: 'Line', value: ' comment above', range: [ 129, 145 ] } ],
trailingComments:
[ { type: 'Block',
value: '*\n * This is some documentation for this function\n ',
range: [ 203, 258 ] } ] },
{ type: 'FunctionDeclaration',
id: { type: 'Identifier', name: 'foo', range: [ 268, 271 ] },
params: [],
defaults: [],
body: { type: 'BlockStatement', body: [], range: [ 274, 278 ] },
rest: null,
generator: false,
expression: false,
range: [ 259, 278 ],
leadingComments:
[ { type: 'Block',
value: '*\n * This is some documentation for this function\n ',
range: [ 203, 258 ] } ] } ],
range: [ 0, 278 ],
comments:
[ { type: 'Line', value: ' Pre-a comment', range: [ 16, 32 ] },
{ type: 'Line', value: ' hello', range: [ 78, 86 ] },
{ type: 'Line', value: ' comment above', range: [ 129, 145 ] },
{ type: 'Line', value: ' comment below', range: [ 167, 183 ] },
{ type: 'Block',
value: '*\n * This is some documentation for this function\n ',
range: [ 203, 258 ] } ] }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment