1
0
mirror of https://github.com/fluencelabs/assemblyscript synced 2025-07-26 19:52:09 +00:00
This commit is contained in:
dcodeIO
2017-12-02 20:58:39 +01:00
parent b9edfb5185
commit 9e053f311e
7 changed files with 226 additions and 9 deletions

@@ -1118,8 +1118,7 @@ export class Parser extends DiagnosticEmitter {
this.error(DiagnosticCode._0_expected, tn.range(), ":");
// 'default' ':' Statement*
} else if (tn.nextToken == Token.DEFAULT) {
tn.next();
} else if (tn.skip(Token.DEFAULT)) {
if (tn.skip(Token.COLON)) {
const statements: Statement[] = new Array();
while (tn.peek() != Token.CASE && tn.nextToken != Token.DEFAULT && tn.nextToken != Token.CLOSEBRACE) {