Skip to content

Commit

Permalink
Add tests for parenthesized functions/classes (fixes #302)
Browse files Browse the repository at this point in the history
  • Loading branch information
not-an-aardvark committed Mar 29, 2017
1 parent 0197ee1 commit eba8187
Show file tree
Hide file tree
Showing 4 changed files with 532 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,244 @@
module.exports = {
"type": "Program",
"start": 0,
"end": 26,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 26
}
},
"range": [
0,
26
],
"body": [
{
"type": "ExportDefaultDeclaration",
"start": 0,
"end": 26,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 26
}
},
"range": [
0,
26
],
"declaration": {
"type": "ClassExpression",
"start": 16,
"end": 24,
"loc": {
"start": {
"line": 1,
"column": 16
},
"end": {
"line": 1,
"column": 24
}
},
"range": [
16,
24
],
"id": null,
"superClass": null,
"body": {
"type": "ClassBody",
"start": 22,
"end": 24,
"loc": {
"start": {
"line": 1,
"column": 22
},
"end": {
"line": 1,
"column": 24
}
},
"range": [
22,
24
],
"body": []
}
}
}
],
"sourceType": "module",
"tokens": [
{
"type": "Keyword",
"value": "export",
"start": 0,
"end": 6,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 6
}
},
"range": [
0,
6
]
},
{
"type": "Keyword",
"value": "default",
"start": 7,
"end": 14,
"loc": {
"start": {
"line": 1,
"column": 7
},
"end": {
"line": 1,
"column": 14
}
},
"range": [
7,
14
]
},
{
"type": "Punctuator",
"value": "(",
"start": 15,
"end": 16,
"loc": {
"start": {
"line": 1,
"column": 15
},
"end": {
"line": 1,
"column": 16
}
},
"range": [
15,
16
]
},
{
"type": "Keyword",
"value": "class",
"start": 16,
"end": 21,
"loc": {
"start": {
"line": 1,
"column": 16
},
"end": {
"line": 1,
"column": 21
}
},
"range": [
16,
21
]
},
{
"type": "Punctuator",
"value": "{",
"start": 22,
"end": 23,
"loc": {
"start": {
"line": 1,
"column": 22
},
"end": {
"line": 1,
"column": 23
}
},
"range": [
22,
23
]
},
{
"type": "Punctuator",
"value": "}",
"start": 23,
"end": 24,
"loc": {
"start": {
"line": 1,
"column": 23
},
"end": {
"line": 1,
"column": 24
}
},
"range": [
23,
24
]
},
{
"type": "Punctuator",
"value": ")",
"start": 24,
"end": 25,
"loc": {
"start": {
"line": 1,
"column": 24
},
"end": {
"line": 1,
"column": 25
}
},
"range": [
24,
25
]
},
{
"type": "Punctuator",
"value": ";",
"start": 25,
"end": 26,
"loc": {
"start": {
"line": 1,
"column": 25
},
"end": {
"line": 1,
"column": 26
}
},
"range": [
25,
26
]
}
]
};
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export default (class {});
Loading

0 comments on commit eba8187

Please sign in to comment.