projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[project @ 2005-10-27 14:35:20 by simonpj]
[ghc-hetmet.git]
/
ghc
/
compiler
/
parser
/
Lexer.x
diff --git
a/ghc/compiler/parser/Lexer.x
b/ghc/compiler/parser/Lexer.x
index
5351af1
..
407b5fa
100644
(file)
--- 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* (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)
"{-#" $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* (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 }
"{-#" $whitechar* (DEPRECATED|deprecated)
{ token ITdeprecated_prag }
"{-#" $whitechar* (SCC|scc) { token ITscc_prag }
@@
-350,10
+355,11
@@
data Token
| ITdotnet
| ITmdo
| 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
| ITsource_prag
- | ITinline_prag
- | ITnoinline_prag
| ITrules_prag
| ITdeprecated_prag
| ITline_prag
| ITrules_prag
| ITdeprecated_prag
| ITline_prag