From 808945c21c5128e4db2b23c4107c8b9d7e3382e1 Mon Sep 17 00:00:00 2001 From: Florian Hahn Date: Mon, 29 Dec 2014 21:29:31 +0100 Subject: [PATCH] Handle range in model lexer correctly #15877 --- src/grammar/RustLexer.g4 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/grammar/RustLexer.g4 b/src/grammar/RustLexer.g4 index 0ff9af7aca1..00af6d358e5 100644 --- a/src/grammar/RustLexer.g4 +++ b/src/grammar/RustLexer.g4 @@ -112,7 +112,8 @@ LIT_INTEGER ; LIT_FLOAT - : [0-9][0-9_]* ('.' | ('.' [0-9][0-9_]*)? ([eE] [-+]? [0-9][0-9_]*)? SUFFIX?) + : [0-9][0-9_]* ( '.' {_input.LA(1) != '.'}? + | ('.' [0-9][0-9_]*)? ([eE] [-+]? [0-9][0-9_]*)? SUFFIX?) ; LIT_STR