Skip to content

Commit

Permalink
Fix parse error for malformed dim statement
Browse files Browse the repository at this point in the history
  • Loading branch information
TwitchBronBron committed Aug 22, 2022
1 parent c45ac14 commit 64597a0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/parser/Parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1761,7 +1761,9 @@ export class Parser {
});
}
let rightSquareBracket = this.tryConsume(DiagnosticMessages.missingRightSquareBracketAfterDimIdentifier(), TokenKind.RightSquareBracket);
this.currentSymbolTable.addSymbol(identifier.text, identifier.range, DynamicType.instance);
if (identifier) {
this.currentSymbolTable.addSymbol(identifier.text, identifier.range, DynamicType.instance);
}
return new DimStatement(dim, identifier, leftSquareBracket, expressions, rightSquareBracket);
}

Expand Down

0 comments on commit 64597a0

Please sign in to comment.