Skip to content

Instantly share code, notes, and snippets.

@jeffmo
Created March 21, 2014 16:30
Show Gist options
  • Save jeffmo/9690116 to your computer and use it in GitHub Desktop.
Save jeffmo/9690116 to your computer and use it in GitHub Desktop.
{
type: "Program",
children: [
{
type: "MultiLineComment",
children: [
{
type: "MultiLineCommentStartToken",
value: "/*",
loc: {
start: {
line: 1,
col: 1
},
end: {
line: 1,
col: 2
},
range: [
0,
2
]
}
},
{
type: "MultiLineCommentTextToken",
value: "1",
loc: {
start: {
line: 1,
col: 3
},
end: {
line: 1,
col: 3
},
range: [
2,
3
]
}
},
{
type: "MultiLineCommentEndToken",
value: "*/",
loc: {
start: {
line: 1,
col: 4
},
end: {
line: 1,
col: 5
},
range: [
3,
5
]
}
}
],
loc: {
start: {
line: 1,
col: 1
},
end: {
line: 1,
col: 5
},
range: [
0,
5
]
}
},
{
type: "FunctionDeclaration",
children: [
{
type: "KeywordToken",
value: "function",
loc: {
start: {
line: 1,
col: 7
},
end: {
line: 1,
col: 15
},
range: [
6,
14
]
}
},
{
type: "MultiLineComment",
children: [
{
type: "MultiLineCommentStartToken",
value: "/*",
loc: {
start: {
line: 1,
col: 16
},
end: {
line: 1,
col: 17
},
range: [
15,
17
]
}
},
{
type: "MultiLineCommentTextToken",
value: "2",
loc: {
start: {
line: 1,
col: 18
},
end: {
line: 1,
col: 18
},
range: [
17,
18
]
}
},
{
type: "MultiLineCommentEndToken",
value: "*/",
loc: {
start: {
line: 1,
col: 19
},
end: {
line: 1,
col: 20
},
range: [
18,
20
]
}
}
],
loc: {
start: {
line: 1,
col: 16
},
end: {
line: 1,
col: 20
},
range: [
15,
20
]
}
},
{
type: "IdentifierToken",
value: "foo",
loc: {
start: {
line: 1,
col: 22
},
end: {
line: 1,
col: 25
},
range: [
21,
24
]
}
},
{
type: "MultiLineComment",
children: [
{
type: "MultiLineCommentStartToken",
value: "/*",
loc: {
start: {
line: 1,
col: 26
},
end: {
line: 1,
col: 27
},
range: [
25,
27
]
}
},
{
type: "MultiLineCommentTextToken",
value: "3",
loc: {
start: {
line: 1,
col: 28
},
end: {
line: 1,
col: 28
},
range: [
27,
28
]
}
},
{
type: "MultiLineCommentEndToken",
value: "*/",
loc: {
start: {
line: 1,
col: 29
},
end: {
line: 1,
col: 30
},
range: [
28,
30
]
}
}
],
loc: {
start: {
line: 1,
col: 26
},
end: {
line: 1,
col: 30
},
range: [
25,
30
]
}
},
{
type: "PunctuatorToken",
value: "(",
loc: {
start: {
line: 1,
col: 32
},
end: {
line: 1,
col: 33
},
range: [
31,
32
]
}
},
{
type: "MultiLineComment",
children: [
{
type: "MultiLineCommentStartToken",
value: "/*",
loc: {
start: {
line: 1,
col: 34
},
end: {
line: 1,
col: 35
},
range: [
33,
35
]
}
},
{
type: "MultiLineCommentTextToken",
value: "4",
loc: {
start: {
line: 1,
col: 36
},
end: {
line: 1,
col: 36
},
range: [
35,
36
]
}
},
{
type: "MultiLineCommentEndToken",
value: "*/",
loc: {
start: {
line: 1,
col: 37
},
end: {
line: 1,
col: 38
},
range: [
36,
38
]
}
}
],
loc: {
start: {
line: 1,
col: 34
},
end: {
line: 1,
col: 38
},
range: [
33,
38
]
}
},
{
type: "PunctuatorToken",
value: ")",
loc: {
start: {
line: 1,
col: 40
},
end: {
line: 1,
col: 41
},
range: [
39,
40
]
}
},
{
type: "MultiLineComment",
children: [
{
type: "MultiLineCommentStartToken",
value: "/*",
loc: {
start: {
line: 1,
col: 42
},
end: {
line: 1,
col: 43
},
range: [
41,
43
]
}
},
{
type: "MultiLineCommentTextToken",
value: "5",
loc: {
start: {
line: 1,
col: 44
},
end: {
line: 1,
col: 44
},
range: [
43,
44
]
}
},
{
type: "MultiLineCommentEndToken",
value: "*/",
loc: {
start: {
line: 1,
col: 45
},
end: {
line: 1,
col: 46
},
range: [
44,
46
]
}
}
],
loc: {
start: {
line: 1,
col: 42
},
end: {
line: 1,
col: 46
},
range: [
41,
46
]
}
},
{
type: "BlockStatement",
children: [
{
type: "PunctuatorToken",
value: "{",
loc: {
start: {
line: 1,
col: 48
},
end: {
line: 1,
col: 49
},
range: [
47,
48
]
}
},
{
type: "SingleLineComment",
children: [
{
type: "SingleLineCommentStartToken",
value: "//",
loc: {
start: {
line: 2,
col: 51
},
end: {
line: 2,
col: 52
},
range: [
51,
53
]
}
},
{
type: "SingeLineCommentTextToken",
value: " ..",
loc: {
start: {
line: 2,
col: 53
},
end: {
line: 2,
col: 55
},
range: [
53,
57
]
}
}
],
loc: {
start: {
line: 2,
col: 51
},
end: {
line: 2,
col: 55
},
range: [
51,
57
]
}
},
{
type: "PunctuatorToken",
value: "}",
loc: {
start: {
line: 3,
col: 1
},
end: {
line: 3,
col: 2
},
range: [
57,
58
]
}
}
],
loc: {
start: {
line: 1,
col: 48
},
end: {
line: 3,
col: 1
},
range: [
47,
58
]
}
}
],
loc: {
start: {
line: 1,
col: 7
},
end: {
line: 3,
col: 3
},
range: [
6,
58
]
}
}
],
loc: {
start: {
line: 1,
col: 1
},
end: {
line: 3,
col: 2
},
range: [
0,
58
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment