Merge pull request #1428 from haocao/master

bug fixed for parser relative stuffs.
This commit is contained in:
高铁
2016-09-24 01:27:32 -05:00
committed by GitHub
2 changed files with 4 additions and 10 deletions
@@ -397,13 +397,8 @@ public class Lexer {
scanChar();
token = COLONCOLON;
} else {
if (isDigit(ch)) {
unscan();
scanVariable();
} else {
unscan();
scanVariable();
}
unscan();
scanVariable();
}
return;
case '#':
@@ -455,8 +450,7 @@ public class Lexer {
scanVariable();
return;
case '-':
int subNextChar = charAt(pos + 1);
if (subNextChar == '-') {
if (charAt(pos +1) == '-') {
scanComment();
if ((token() == Token.LINE_COMMENT || token() == Token.MULTI_LINE_COMMENT) && skipComment) {
bufPos = 0;
@@ -306,7 +306,7 @@ public enum Token {
TILDE_EQ("~="),
QUES("?"),
COLON(":"),
COLONCOLON(":"),
COLONCOLON("::"),
COLONEQ(":="),
EQEQ("=="),
LTEQ("<="),