Skip to content

Commit

Permalink
For issue #559
Browse files Browse the repository at this point in the history
  • Loading branch information
mty2015 committed Jan 16, 2018
1 parent d113495 commit d2a84d5
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 d2a84d5

Please sign in to comment.