Skip to content

Instantly share code, notes, and snippets.

@armano2
Created November 20, 2018 21:03
Show Gist options
  • Save armano2/18e737574bf4eed563c2ec779e09c312 to your computer and use it in GitHub Desktop.
Save armano2/18e737574bf4eed563c2ec779e09c312 to your computer and use it in GitHub Desktop.
{
"type": "Program",
"range": [
1,
29
],
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 4,
"column": 1
}
},
"body": [
{
"type": "TSEnumDeclaration",
"range": [
1,
29
],
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 4,
"column": 1
}
},
"id": {
"type": "Identifier",
"range": [
6,
9
],
"loc": {
"start": {
"line": 2,
"column": 5
},
"end": {
"line": 2,
"column": 8
}
},
"name": "Foo"
},
"members": [
{
"type": "TSEnumMember",
"range": [
16,
27
],
"loc": {
"start": {
"line": 3,
"column": 4
},
"end": {
"line": 3,
"column": 15
}
},
"id": {
"type": "Identifier",
"range": [
16,
19
],
"loc": {
"start": {
"line": 3,
"column": 4
},
"end": {
"line": 3,
"column": 7
}
},
"name": "BAR"
},
"initializer": {
"type": "Literal",
"range": [
22,
27
],
"loc": {
"start": {
"line": 3,
"column": 10
},
"end": {
"line": 3,
"column": 15
}
},
"raw": "'bar'",
"value": "bar"
}
}
]
}
],
"sourceType": "script",
"tokens": [
{
"type": "Keyword",
"value": "enum",
"range": [
1,
5
],
"loc": {
"start": {
"line": 2,
"column": 0
},
"end": {
"line": 2,
"column": 4
}
}
},
{
"type": "Identifier",
"value": "Foo",
"range": [
6,
9
],
"loc": {
"start": {
"line": 2,
"column": 5
},
"end": {
"line": 2,
"column": 8
}
}
},
{
"type": "Punctuator",
"value": "{",
"range": [
10,
11
],
"loc": {
"start": {
"line": 2,
"column": 9
},
"end": {
"line": 2,
"column": 10
}
}
},
{
"type": "Identifier",
"value": "BAR",
"range": [
16,
19
],
"loc": {
"start": {
"line": 3,
"column": 4
},
"end": {
"line": 3,
"column": 7
}
}
},
{
"type": "Punctuator",
"value": "=",
"range": [
20,
21
],
"loc": {
"start": {
"line": 3,
"column": 8
},
"end": {
"line": 3,
"column": 9
}
}
},
{
"type": "String",
"value": "'bar'",
"range": [
22,
27
],
"loc": {
"start": {
"line": 3,
"column": 10
},
"end": {
"line": 3,
"column": 15
}
}
},
{
"type": "Punctuator",
"value": "}",
"range": [
28,
29
],
"loc": {
"start": {
"line": 4,
"column": 0
},
"end": {
"line": 4,
"column": 1
}
}
}
],
"comments": [],
"parent": null
}
enum Foo {
BAR = 'bar'
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment