X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;ds=sidebyside;f=compiler%2Fparser%2FLexer.x;h=15745d5620f27080eca1620a7ca8a651dc044171;hb=3ad8f84f6a75f240383e62a14472d14eb372dcd1;hp=bc1134074ca0d6df57b390e6fc67b0e7c11826c0;hpb=284d83ee6ff1f817d4f7b72f84887f292d96660a;p=ghc-hetmet.git diff --git a/compiler/parser/Lexer.x b/compiler/parser/Lexer.x index bc11340..15745d5 100644 --- a/compiler/parser/Lexer.x +++ b/compiler/parser/Lexer.x @@ -27,7 +27,7 @@ module Lexer ( failLocMsgP, failSpanMsgP, srcParseFail, popContext, pushCurrentContext, setLastToken, setSrcLoc, getLexState, popLexState, pushLexState, - extension, bangPatEnabled + extension, glaExtsEnabled, bangPatEnabled ) where #include "HsVersions.h" @@ -250,7 +250,6 @@ $white_no_nl+ ; <0,glaexts> { \? @varid / { ifExtension ipEnabled } { skip_one_varid ITdupipvarid } - \% @varid / { ifExtension ipEnabled } { skip_one_varid ITsplitipvarid } } { @@ -346,6 +345,7 @@ data Token | ITderiving | ITdo | ITelse + | ITfor | IThiding | ITif | ITimport @@ -442,7 +442,6 @@ data Token | ITqconsym (FastString,FastString) | ITdupipvarid FastString -- GHC extension: implicit param: ?x - | ITsplitipvarid FastString -- GHC extension: implicit param: %x | ITpragma StringBuffer @@ -490,6 +489,7 @@ isSpecial :: Token -> Bool -- not as a keyword. isSpecial ITas = True isSpecial IThiding = True +isSpecial ITfor = True isSpecial ITqualified = True isSpecial ITforall = True isSpecial ITexport = True @@ -523,6 +523,7 @@ reservedWordsFM = listToUFM $ ( "deriving", ITderiving, 0 ), ( "do", ITdo, 0 ), ( "else", ITelse, 0 ), + ( "for", ITfor, 0 ), ( "hiding", IThiding, 0 ), ( "if", ITif, 0 ), ( "import", ITimport, 0 ),