diff options
author | cushon <cushon@google.com> | 2016-10-24 12:30:36 -0700 |
---|---|---|
committer | Liam Miller-Cushon <cushon@google.com> | 2016-10-24 18:29:36 -0700 |
commit | f2b680d3e66ede441107f54d8a1f367c172d8f04 (patch) | |
tree | 50b06343a0b370302e000c07cfd6c0f1e399fa85 /java/com/google/turbine/parse/StreamLexer.java | |
parent | 294740d5cd0101a94f898a594258960ecfd9ebcc (diff) | |
download | turbine-f2b680d3e66ede441107f54d8a1f367c172d8f04.tar.gz |
Fix float literal lexing
Support the `Digits ExponentPart [FloatTypeSuffix]` production
in JLS 3.10.2, e.g. `1e0`.
MOE_MIGRATED_REVID=137065662
Diffstat (limited to 'java/com/google/turbine/parse/StreamLexer.java')
-rw-r--r-- | java/com/google/turbine/parse/StreamLexer.java | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/java/com/google/turbine/parse/StreamLexer.java b/java/com/google/turbine/parse/StreamLexer.java index 35dd81d..2197dfc 100644 --- a/java/com/google/turbine/parse/StreamLexer.java +++ b/java/com/google/turbine/parse/StreamLexer.java @@ -474,6 +474,8 @@ public class StreamLexer implements Lexer { private Token decimalLiteral() { readDigits(); switch (ch) { + case 'e': + case 'E': case '.': eat(); return floatLiteral(); |