minor script parser things

git-svn-id: svn://svn.code.sf.net/p/magicseteditor/code/trunk@1243 0fc631ac-6414-0410-93d0-97cfa31319b6
This commit is contained in:
twanvl
2008-12-11 15:46:51 +00:00
parent d4e9476759
commit 010c8d8d0b
+2 -1
View File
@@ -79,6 +79,7 @@ class TokenIterator {
void putBack();
/// Get a section of source code
/** Known problems: does not work correctly when crossing an include-file border */
String getSourceCode(size_t start, size_t end);
/// Get the current line number
int getLineNumber();
@@ -661,7 +662,7 @@ void parseOper(TokenIterator& input, Script& script, Precedence minPrec, Instruc
Token t = input.peek();
if (t == _("else")) {// or else
input.read(); // skip else
parseOper(input, script, PREC_CMP, I_BINARY, I_OR_ELSE);
parseOper(input, script, PREC_ADD, I_BINARY, I_OR_ELSE);
} else {
parseOper(input, script, PREC_CMP, I_BINARY, I_OR);
}