浏览代码

Also when a statement folloes an "else if" and has no newline or semicolon presents the same problem reported from previous commit.

mingodad 13 年之前
父节点
当前提交
dbc3b5d130
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      squirrel/sqcompiler.cpp

+ 1 - 1
squirrel/sqcompiler.cpp

@@ -1149,7 +1149,7 @@ if(color == "yellow"){
 			_fs->AddInstruction(_OP_JMP);
 			_fs->AddInstruction(_OP_JMP);
 			jmppos = _fs->GetCurrentPos();
 			jmppos = _fs->GetCurrentPos();
 			Lex();
 			Lex();
-			Statement(); OptionalSemicolon();
+			Statement(); if(_token != TK_IDENTIFIER) OptionalSemicolon();
 			END_SCOPE();
 			END_SCOPE();
 			_fs->SetIntructionParam(jmppos, 1, _fs->GetCurrentPos() - jmppos);
 			_fs->SetIntructionParam(jmppos, 1, _fs->GetCurrentPos() - jmppos);
 		}
 		}