We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7bceb3f commit af9503aCopy full SHA for af9503a
src/parser/expr.js
@@ -645,6 +645,10 @@ module.exports = {
645
conds.push(this.read_expr());
646
while (this.token === ",") {
647
this.next();
648
+ if (this.token === this.tok.T_DOUBLE_ARROW) {
649
+ this.next();
650
+ return conds;
651
+ }
652
653
}
654
test/snapshot/match.test.js
@@ -34,7 +34,7 @@ describe("match", () => {
34
it("can have hanging comma", () => {
35
const ast = parser.parseEval(`
36
$test = match($test) {
37
- true => 'ok',
+ true, => 'ok',
38
false => 'Nope!',
39
};
40
`);
0 commit comments