X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2Fparser%2FLexer.x;fp=ghc%2Fcompiler%2Fparser%2FLexer.x;h=407b5fa5168233ce2b3fa191f664644d430b44db;hb=958924a2b338aebbcc8a88ba2cab511517762a19;hp=5351af140c4bc41c2855d1fe582ebcf49dd46263;hpb=47d253ba58b8b7bbbdd2ad21b6aa7ab78f7aef53;p=ghc-hetmet.git diff --git a/ghc/compiler/parser/Lexer.x b/ghc/compiler/parser/Lexer.x index 5351af1..407b5fa 100644 --- a/ghc/compiler/parser/Lexer.x +++ b/ghc/compiler/parser/Lexer.x @@ -175,12 +175,17 @@ $white_no_nl+ ; "{-#" $whitechar* (RULES|rules) { token ITrules_prag } <0,glaexts> { + "{-#" $whitechar* (INLINE|inline) { token (ITinline_prag True) } + "{-#" $whitechar* (NO(T?)INLINE|no(t?)inline) + { token (ITinline_prag False) } + "{-#" $whitechar* (SPECIALI[SZ]E|speciali[sz]e) + { token ITspec_prag } "{-#" $whitechar* (SPECIALI[SZ]E|speciali[sz]e) - { token ITspecialise_prag } + $whitechar* (INLINE|inline) { token (ITspec_inline_prag True) } + "{-#" $whitechar* (SPECIALI[SZ]E|speciali[sz]e) + $whitechar* (NO(T?)INLINE|no(t?)inline) + { token (ITspec_inline_prag False) } "{-#" $whitechar* (SOURCE|source) { token ITsource_prag } - "{-#" $whitechar* (INLINE|inline) { token ITinline_prag } - "{-#" $whitechar* (NO(T?)INLINE|no(t?)inline) - { token ITnoinline_prag } "{-#" $whitechar* (DEPRECATED|deprecated) { token ITdeprecated_prag } "{-#" $whitechar* (SCC|scc) { token ITscc_prag } @@ -350,10 +355,11 @@ data Token | ITdotnet | ITmdo - | ITspecialise_prag -- Pragmas + -- Pragmas + | ITinline_prag Bool -- True <=> INLINE, False <=> NOINLINE + | ITspec_prag -- SPECIALISE + | ITspec_inline_prag Bool -- SPECIALISE INLINE (or NOINLINE) | ITsource_prag - | ITinline_prag - | ITnoinline_prag | ITrules_prag | ITdeprecated_prag | ITline_prag