mirror of
https://git.do.srb2.org/STJr/UltimateZoneBuilder.git
synced 2025-02-17 01:22:18 +00:00
ZScript: fixed a problem where whitespace between a state label and the colon resulted in a parsing error. Fixes #631
This commit is contained in:
parent
d2d400164d
commit
8f70ab66f2
2 changed files with 6 additions and 3 deletions
|
@ -215,8 +215,9 @@ namespace CodeImp.DoomBuilder.ZDoom
|
|||
if (statelabel == null)
|
||||
return false;
|
||||
|
||||
// otherwise expect a colon
|
||||
token = tokenizer.ExpectToken(ZScriptTokenType.Colon);
|
||||
// otherwise expect a colon
|
||||
tokenizer.SkipWhitespace(); // Skip whitepace because there might be whitepsace between the state label and the colon. See https://github.com/jewalky/UltimateDoomBuilder/issues/631
|
||||
token = tokenizer.ExpectToken(ZScriptTokenType.Colon);
|
||||
if (token == null || !token.IsValid)
|
||||
{
|
||||
parser.ReportError("Expected :, got " + ((Object)token ?? "<null>").ToString());
|
||||
|
|
|
@ -107,7 +107,9 @@ namespace CodeImp.DoomBuilder.ZDoom
|
|||
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
tokenizer.SkipWhitespace(); // Skip whitepace because there might be whitepsace between the state label and the colon. See https://github.com/jewalky/UltimateDoomBuilder/issues/631
|
||||
}
|
||||
|
||||
// make sure it's not a label of the next state. if it is, break out.
|
||||
long cpos2 = stream.Position; // local rewind point
|
||||
|
|
Loading…
Reference in a new issue