aboutsummaryrefslogtreecommitdiff
path: root/java/com/google/turbine/parse/StreamLexer.java
diff options
context:
space:
mode:
authorcushon <cushon@google.com>2016-10-31 19:45:19 -0700
committerLiam Miller-Cushon <cushon@google.com>2016-10-31 20:15:44 -0700
commitde35d905b537619839b1c5606c064cbf3ab576c8 (patch)
tree22a851c2f917ff84e7585f3d90eedf7df80d0cc9 /java/com/google/turbine/parse/StreamLexer.java
parentc4b9629cb88f39fb5a648e2081f43afbb2685766 (diff)
downloadturbine-de35d905b537619839b1c5606c064cbf3ab576c8.tar.gz
Improve handling of '_' in numeric literals
* The first character of octal literals is consumed early to disambiguate with a literal 0, and the next character may be '_'. * Double.parseDouble and Float.parseFloat don't handle '_'. MOE_MIGRATED_REVID=137779638
Diffstat (limited to 'java/com/google/turbine/parse/StreamLexer.java')
-rw-r--r--java/com/google/turbine/parse/StreamLexer.java1
1 files changed, 1 insertions, 0 deletions
diff --git a/java/com/google/turbine/parse/StreamLexer.java b/java/com/google/turbine/parse/StreamLexer.java
index 4aef7a8..2303645 100644
--- a/java/com/google/turbine/parse/StreamLexer.java
+++ b/java/com/google/turbine/parse/StreamLexer.java
@@ -751,6 +751,7 @@ public class StreamLexer implements Lexer {
case '5':
case '6':
case '7':
+ case '_':
eat();
break;
default: