forked from lightscript/babylon-lightscript
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
169 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
a | ||
catch Error as err: err |
166 changes: 166 additions & 0 deletions
166
test/fixtures/catch-expression/binding/basic/expected.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,166 @@ | ||
{ | ||
"type": "File", | ||
"start": 0, | ||
"end": 27, | ||
"loc": { | ||
"start": { | ||
"line": 1, | ||
"column": 0 | ||
}, | ||
"end": { | ||
"line": 2, | ||
"column": 25 | ||
} | ||
}, | ||
"program": { | ||
"type": "Program", | ||
"start": 0, | ||
"end": 27, | ||
"loc": { | ||
"start": { | ||
"line": 1, | ||
"column": 0 | ||
}, | ||
"end": { | ||
"line": 2, | ||
"column": 25 | ||
} | ||
}, | ||
"sourceType": "script", | ||
"body": [ | ||
{ | ||
"type": "ExpressionStatement", | ||
"start": 0, | ||
"end": 27, | ||
"loc": { | ||
"start": { | ||
"line": 1, | ||
"column": 0 | ||
}, | ||
"end": { | ||
"line": 2, | ||
"column": 25 | ||
} | ||
}, | ||
"expression": { | ||
"type": "CatchExpression", | ||
"start": 0, | ||
"end": 27, | ||
"loc": { | ||
"start": { | ||
"line": 1, | ||
"column": 0 | ||
}, | ||
"end": { | ||
"line": 2, | ||
"column": 25 | ||
} | ||
}, | ||
"expression": { | ||
"type": "Identifier", | ||
"start": 0, | ||
"end": 1, | ||
"loc": { | ||
"start": { | ||
"line": 1, | ||
"column": 0 | ||
}, | ||
"end": { | ||
"line": 1, | ||
"column": 1 | ||
}, | ||
"identifierName": "a" | ||
}, | ||
"name": "a" | ||
}, | ||
"cases": [ | ||
{ | ||
"type": "CatchCase", | ||
"start": 4, | ||
"end": 27, | ||
"loc": { | ||
"start": { | ||
"line": 2, | ||
"column": 2 | ||
}, | ||
"end": { | ||
"line": 2, | ||
"column": 25 | ||
} | ||
}, | ||
"atoms": [ | ||
{ | ||
"type": "Identifier", | ||
"start": 10, | ||
"end": 15, | ||
"loc": { | ||
"start": { | ||
"line": 2, | ||
"column": 8 | ||
}, | ||
"end": { | ||
"line": 2, | ||
"column": 13 | ||
}, | ||
"identifierName": "Error" | ||
}, | ||
"name": "Error" | ||
} | ||
], | ||
"binding": { | ||
"type": "Identifier", | ||
"start": 19, | ||
"end": 22, | ||
"loc": { | ||
"start": { | ||
"line": 2, | ||
"column": 17 | ||
}, | ||
"end": { | ||
"line": 2, | ||
"column": 20 | ||
}, | ||
"identifierName": "err" | ||
}, | ||
"name": "err" | ||
}, | ||
"consequent": { | ||
"type": "ExpressionStatement", | ||
"start": 24, | ||
"end": 27, | ||
"loc": { | ||
"start": { | ||
"line": 2, | ||
"column": 22 | ||
}, | ||
"end": { | ||
"line": 2, | ||
"column": 25 | ||
} | ||
}, | ||
"expression": { | ||
"type": "Identifier", | ||
"start": 24, | ||
"end": 27, | ||
"loc": { | ||
"start": { | ||
"line": 2, | ||
"column": 22 | ||
}, | ||
"end": { | ||
"line": 2, | ||
"column": 25 | ||
}, | ||
"identifierName": "err" | ||
}, | ||
"name": "err" | ||
} | ||
} | ||
} | ||
] | ||
} | ||
} | ||
], | ||
"directives": [] | ||
} | ||
} |