mirror of
https://github.com/amyinspace/MagicSetEditor2.git
synced 2026-06-12 13:37:00 -04:00
fixed bug in parser for if statement without else
git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@322 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
@@ -405,7 +405,8 @@ void parseExpr(TokenIterator& input, Script& script, Precedence minPrec) {
|
|||||||
jmpEnd = script.getLabel(); // jmp_end:
|
jmpEnd = script.getLabel(); // jmp_end:
|
||||||
script.addInstruction(I_JUMP, 0xFFFF); // jump lbl_end
|
script.addInstruction(I_JUMP, 0xFFFF); // jump lbl_end
|
||||||
script.comeFrom(jmpElse); // lbl_else:
|
script.comeFrom(jmpElse); // lbl_else:
|
||||||
if (input.read() == _("else")) { // else
|
if (input.peek() == _("else")) { // else
|
||||||
|
input.read();
|
||||||
parseOper(input, script, PREC_SET); // CCC
|
parseOper(input, script, PREC_SET); // CCC
|
||||||
} else {
|
} else {
|
||||||
script.addInstruction(I_PUSH_CONST, script_nil);
|
script.addInstruction(I_PUSH_CONST, script_nil);
|
||||||
|
|||||||
Reference in New Issue
Block a user