Skip to content

Instantly share code, notes, and snippets.

@ide
Created February 4, 2012 22:53
Show Gist options
  • Save ide/1740856 to your computer and use it in GitHub Desktop.
Save ide/1740856 to your computer and use it in GitHub Desktop.
Parse tree for ThrowStatement without semicolon
{
name: 'ThrowStatement',
source: 'function x() {\n throw 5\n}',
range: {
location: 17,
length: 8
},
children: [{
name: 'THROW',
source: 'function x() {\n throw 5\n}',
range: {
location: 17,
length: 5
},
children: ['throw']
}, {
name: '__',
source: 'function x() {\n throw 5\n}',
range: {
location: 22,
length: 1
},
children: [{
name: 'WhiteSpace',
source: 'function x() {\n throw 5\n}',
range: {
location: 22,
length: 1
},
children: [' ']
}]
}, {
name: 'Expression',
source: 'function x() {\n throw 5\n}',
range: {
location: 23,
length: 1
},
children: [{
name: 'DecimalIntegerLiteral',
source: 'function x() {\n throw 5\n}',
range: {
location: 23,
length: 1
},
children: ['5']
}]
}, {
name: 'EOS',
source: 'function x() {\n throw 5\n}',
range: {
location: 24,
length: 1
},
children: [{
name: '__',
source: 'function x() {\n throw 5\n}',
range: {
location: 24,
length: 0
},
children: []
}, {
name: 'LineTerminatorSequence',
source: 'function x() {\n throw 5\n}',
range: {
location: 24,
length: 1
},
children: ['\n']
}]
}]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment