Skip to content

Commit e4e4202

Browse files
committed
Add bangCall parsing to lsc test suite
1 parent 0b6c44a commit e4e4202

File tree

3 files changed

+4
-18
lines changed

3 files changed

+4
-18
lines changed

src/plugins/safeCallExistential.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,9 @@ export default function(parser) {
6565
if (this.hasPlugin("existentialExpression")) {
6666
return this.parseExistential(lhs, startPos, startLoc);
6767
} else {
68-
this.unexpected(questionPos);
68+
// Possibly a flow type assertion; unwind
69+
this.state = state;
70+
return [null, false];
6971
}
7072
};
7173

test/fixtures/lightscript/options.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"alternatives": {
44
"all": {
55
"allPlugins": true,
6-
"excludePlugins": ["existentialExpression", "safeCallExpression", "splatComprehension", "bangCall", "flippedImports", "whiteblockOnly"]
6+
"excludePlugins": ["existentialExpression", "flippedImports", "whiteblockOnly"]
77
}
88
}
99
}

test/fixtures/lightscript/whitespace/body-termination-bangCall/options.json

-16
This file was deleted.

0 commit comments

Comments
 (0)