Replaced old expect messages with new `expect(string)`
parent
4ed0b385cf
commit
bfdbaaeee7
|
@ -193,8 +193,7 @@ public final class Parser
|
||||||
/* TODO: We can sometimes run out of tokens before getting our closing brace, we should fix that here */
|
/* TODO: We can sometimes run out of tokens before getting our closing brace, we should fix that here */
|
||||||
if(!closedBeforeExit)
|
if(!closedBeforeExit)
|
||||||
{
|
{
|
||||||
gprintln("Expected closing } but ran out of tokens", DebugType.ERROR);
|
expect("Expected closing } but ran out of tokens");
|
||||||
exit(0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
gprintln("parseBody(): Leave", DebugType.WARNING);
|
gprintln("parseBody(): Leave", DebugType.WARNING);
|
||||||
|
@ -240,8 +239,7 @@ public final class Parser
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* TODO: Error */
|
/* TODO: Error */
|
||||||
gprintln("Expecting either ) or , but got "~getCurrentToken().getToken(), DebugType.ERROR);
|
expect("Expecting either ) or , but got "~getCurrentToken().getToken());
|
||||||
exit(0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
gprintln("ParseFuncDef: ParameterDec: (Type: "~type~", Identifier: "~identifier~")",DebugType.WARNING);
|
gprintln("ParseFuncDef: ParameterDec: (Type: "~type~", Identifier: "~identifier~")",DebugType.WARNING);
|
||||||
|
@ -371,8 +369,7 @@ public final class Parser
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
gprintln("Expected one of the following: (, ; or =", DebugType.ERROR);
|
expect("Expected one of the following: (, ; or =");
|
||||||
exit(0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* TODO: If we outta tokens we should not call this */
|
/* TODO: If we outta tokens we should not call this */
|
||||||
|
@ -477,8 +474,7 @@ public final class Parser
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
gprintln("parse(): Unknown '"~tok.getToken()~"'", DebugType.ERROR);
|
expect("parse(): Unknown '"~tok.getToken()~"'");
|
||||||
exit(0);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue