Skip to content

Commit

Permalink
Merge pull request #564 from hongfuli/bugfix_559
Browse files Browse the repository at this point in the history
For issue #559
  • Loading branch information
terrymanu authored Jan 17, 2018
2 parents 409c024 + d2a84d5 commit 6edc766
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ private boolean isHexDecimalBegin() {

private boolean isNumberBegin() {
return CharType.isDigital(getCurrentChar(0)) || ('.' == getCurrentChar(0) && CharType.isDigital(getCurrentChar(1)) && !isIdentifierBegin(getCurrentChar(-1))
|| ('-' == getCurrentChar(0) && ('.' == getCurrentChar(0) || CharType.isDigital(getCurrentChar(1)))));
|| ('-' == getCurrentChar(0) && ('.' == getCurrentChar(1) || CharType.isDigital(getCurrentChar(1)))));
}

private boolean isSymbolBegin() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ public void assertNextTokenForNumber() {
assertNextTokenForNumber("0x-1e", Literals.HEX);
assertNextTokenForNumber("123", Literals.INT);
assertNextTokenForNumber("-123", Literals.INT);
assertNextTokenForNumber("-.123", Literals.FLOAT);
assertNextTokenForNumber("123.0", Literals.FLOAT);
assertNextTokenForNumber("123e4", Literals.FLOAT);
assertNextTokenForNumber("123E4", Literals.FLOAT);
Expand Down

0 comments on commit 6edc766

Please sign in to comment.