X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2Fparser%2FLexer.x;h=27424323c637b5659f6e969941a55c7a8f0875d8;hp=46f7488dcc57c1adb955c95d6e8644c54bdd2c40;hb=3391a03562d4056de7b16cd0f632e6c43ae44cca;hpb=ee5addccd1929a7368a39b2c88d1b77f0bc8fb73 diff --git a/compiler/parser/Lexer.x b/compiler/parser/Lexer.x index 46f7488..2742432 100644 --- a/compiler/parser/Lexer.x +++ b/compiler/parser/Lexer.x @@ -68,7 +68,7 @@ import UniqFM import DynFlags import Module import Ctype -import BasicTypes ( InlineSpec(..), RuleMatchInfo(..) ) +import BasicTypes ( InlineSpec(..), RuleMatchInfo(..), FractionalLit(..) ) import Util ( readRational ) import Control.Monad @@ -541,7 +541,7 @@ data Token | ITchar Char | ITstring FastString | ITinteger Integer - | ITrational Rational + | ITrational FractionalLit | ITprimchar Char | ITprimstring FastString @@ -1061,7 +1061,7 @@ hexadecimal = (16,hexDigit) -- readRational can understand negative rationals, exponents, everything. tok_float, tok_primfloat, tok_primdouble :: String -> Token -tok_float str = ITrational $! readRational str +tok_float str = ITrational $! FL { fl_text = str, fl_value = readRational str } tok_primfloat str = ITprimfloat $! readRational str tok_primdouble str = ITprimdouble $! readRational str