aboutsummaryrefslogtreecommitdiff
path: root/lib/Parser/Parser.cc
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Parser/Parser.cc')
-rw-r--r--lib/Parser/Parser.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/Parser/Parser.cc b/lib/Parser/Parser.cc
index 58422fc..d8fecdc 100644
--- a/lib/Parser/Parser.cc
+++ b/lib/Parser/Parser.cc
@@ -45,7 +45,7 @@ std::vector<std::unique_ptr<StmtAST>> Parser::Parse() {
void Parser::syncToStatementStart() {
while (CurTok != tok_eof) {
switch (CurTok) {
- case tok_declare: case tok_identifier: case tok_input: case tok_output:
+ case tok_constant: case tok_declare: case tok_identifier: case tok_input: case tok_output:
case tok_case: case tok_endcase: case tok_otherwise:
case tok_if: case tok_while: case tok_repeat: case tok_for:
case tok_function: case tok_procedure: case tok_call: case tok_return:
@@ -98,6 +98,7 @@ std::unique_ptr<StmtAST> Parser::ParseStatementImpl() {
getNextToken();
return nullptr;
}
+ if (CurTok == tok_constant) return ParseConstant();
if (CurTok == tok_declare) {
return ParseDeclare();
}