Commit 21e6f1f3 authored by simonmar's avatar simonmar
Browse files

[project @ 2002-02-11 15:23:12 by simonmar]

Fix lexer bug: we didn't look far enough ahead when parsing 1.0e+x
(i.e. the e+x shouldn't be treated as an exponent).
parent 5c3eb381
......@@ -925,8 +925,10 @@ lex_num cont exts acc buf =
do_exponent
= let buf3 = incLexeme buf2 in
case currentChar# buf3 of
'-'# -> expandWhile# is_digit (incLexeme buf3)
'+'# -> expandWhile# is_digit (incLexeme buf3)
'-'# | is_digit (lookAhead# buf 1#)
-> expandWhile# is_digit (incLexeme buf3)
'+'# | is_digit (lookAhead# buf 1#)
-> expandWhile# is_digit (incLexeme buf3)
x | is_digit x -> expandWhile# is_digit buf3
_ -> buf2
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment