From: <bi...@us...> - 2014-09-29 16:45:54
|
Revision: 10578 http://sourceforge.net/p/oorexx/code-0/10578 Author: bigrixx Date: 2014-09-29 16:45:45 +0000 (Mon, 29 Sep 2014) Log Message: ----------- Fix error with continuation characters Modified Paths: -------------- main/trunk/interpreter/parser/LanguageParser.cpp main/trunk/interpreter/parser/Scanner.cpp main/trunk/interpreter/parser/Token.hpp Modified: main/trunk/interpreter/parser/LanguageParser.cpp =================================================================== --- main/trunk/interpreter/parser/LanguageParser.cpp 2014-09-29 13:44:15 UTC (rev 10577) +++ main/trunk/interpreter/parser/LanguageParser.cpp 2014-09-29 16:45:45 UTC (rev 10578) @@ -905,7 +905,7 @@ token = sourceNextToken(OREF_NULL); // OREF_NULL indicates we've hit the end of the source. Mark us as // finished and return - if (token == OREF_NULL) + if (token->isEndOfFile()) { flags.set(noClause); return false; Modified: main/trunk/interpreter/parser/Scanner.cpp =================================================================== --- main/trunk/interpreter/parser/Scanner.cpp 2014-09-29 13:44:15 UTC (rev 10577) +++ main/trunk/interpreter/parser/Scanner.cpp 2014-09-29 16:45:45 UTC (rev 10578) @@ -768,7 +768,7 @@ // hit the end of the file while scanning for the next token? Return nothing if (tokenClass == CLAUSE_EOF) { - return OREF_NULL; + return clause->newToken(TOKEN_EOC, CLAUSEEND_EOF, location); } // we hit the end of line on the clause Modified: main/trunk/interpreter/parser/Token.hpp =================================================================== --- main/trunk/interpreter/parser/Token.hpp 2014-09-29 13:44:15 UTC (rev 10577) +++ main/trunk/interpreter/parser/Token.hpp 2014-09-29 16:45:45 UTC (rev 10578) @@ -550,6 +550,7 @@ inline bool isLeftBracket() { return classId == TOKEN_SQLEFT; } inline bool isRightBracket() { return classId == TOKEN_SQRIGHT; } inline bool isEndOfClause() { return classId == TOKEN_EOC; } + inline bool isEndOfFile() { return isEndOfClause() && isSubtype(CLAUSEEND_EOF); } inline bool isBlankSignificant() { return (classId == TOKEN_SYMBOL || classId == TOKEN_LITERAL || classId == TOKEN_RIGHT || classId == TOKEN_SQRIGHT); } inline bool isMessageOperator() { return classId == TOKEN_TILDE || classId == TOKEN_DTILDE || classId == TOKEN_SQLEFT; } |