Error out on invalid form for `parseTypedDeclaration`

expression_parsing.sync-conflict-20210316-090018-O3W7KWN
Tristan B. V. Kildaire 2021-03-03 15:32:28 +02:00
parent eca6acf4bf
commit aa8c23b4c7
1 changed files with 6 additions and 0 deletions

View File

@ -5,6 +5,7 @@ import std.conv : to;
import std.string : isNumeric, cmp;
import compiler.symbols : SymbolType;
import compiler.lexer : Token;
import core.stdc.stdlib;
public final class Parser
{
@ -199,6 +200,11 @@ public final class Parser
gprintln("ParseTypedDec: VariableDeclarationWithAssingment: (Type: "~type~", Identifier: "~identifier~")", DebugType.WARNING);
}
else
{
gprintln("Expected one of the following: (, ; or =", DebugType.ERROR);
exit(0);
}