projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
White space only
[ghc-hetmet.git]
/
compiler
/
parser
/
Lexer.x
diff --git
a/compiler/parser/Lexer.x
b/compiler/parser/Lexer.x
index
5fa2768
..
b3b4804
100644
(file)
--- a/
compiler/parser/Lexer.x
+++ b/
compiler/parser/Lexer.x
@@
-12,7
+12,6
@@
-----------------------------------------------------------------------------
-- ToDo / known bugs:
-----------------------------------------------------------------------------
-- ToDo / known bugs:
--- - Unicode
-- - parsing integers is a bit slow
-- - readRational is a bit slow
--
-- - parsing integers is a bit slow
-- - readRational is a bit slow
--
@@
-32,7
+31,7
@@
-- qualified varids.
{
-- qualified varids.
{
-{-# OPTIONS -Wwarn #-}
+{-# OPTIONS -Wwarn -w #-}
-- The above warning supression flag is a temporary kludge.
-- While working on this module you are encouraged to remove it and fix
-- any warnings in the module. See
-- The above warning supression flag is a temporary kludge.
-- While working on this module you are encouraged to remove it and fix
-- any warnings in the module. See
@@
-485,6
+484,7
@@
data Token
| ITunsafe
| ITstdcallconv
| ITccallconv
| ITunsafe
| ITstdcallconv
| ITccallconv
+ | ITprimcallconv
| ITdotnet
| ITmdo
| ITfamily
| ITdotnet
| ITmdo
| ITfamily
@@
-632,6
+632,7
@@
isSpecial ITthreadsafe = True
isSpecial ITunsafe = True
isSpecial ITccallconv = True
isSpecial ITstdcallconv = True
isSpecial ITunsafe = True
isSpecial ITccallconv = True
isSpecial ITstdcallconv = True
+isSpecial ITprimcallconv = True
isSpecial ITmdo = True
isSpecial ITfamily = True
isSpecial ITgroup = True
isSpecial ITmdo = True
isSpecial ITfamily = True
isSpecial ITgroup = True
@@
-689,10
+690,11
@@
reservedWordsFM = listToUFM $
( "label", ITlabel, bit ffiBit),
( "dynamic", ITdynamic, bit ffiBit),
( "safe", ITsafe, bit ffiBit),
( "label", ITlabel, bit ffiBit),
( "dynamic", ITdynamic, bit ffiBit),
( "safe", ITsafe, bit ffiBit),
- ( "threadsafe", ITthreadsafe, bit ffiBit),
+ ( "threadsafe", ITthreadsafe, bit ffiBit), -- ToDo: remove
( "unsafe", ITunsafe, bit ffiBit),
( "stdcall", ITstdcallconv, bit ffiBit),
( "ccall", ITccallconv, bit ffiBit),
( "unsafe", ITunsafe, bit ffiBit),
( "stdcall", ITstdcallconv, bit ffiBit),
( "ccall", ITccallconv, bit ffiBit),
+ ( "prim", ITprimcallconv, bit ffiBit),
( "dotnet", ITdotnet, bit ffiBit),
( "rec", ITrec, bit arrowsBit),
( "dotnet", ITdotnet, bit ffiBit),
( "rec", ITrec, bit arrowsBit),
@@
-1502,14
+1504,14
@@
data ParseResult a
data PState = PState {
buffer :: StringBuffer,
data PState = PState {
buffer :: StringBuffer,
- dflags :: DynFlags,
- messages :: Messages,
+ dflags :: DynFlags,
+ messages :: Messages,
last_loc :: SrcSpan, -- pos of previous token
last_offs :: !Int, -- offset of the previous token from the
-- beginning of the current line.
-- \t is equal to 8 spaces.
last_len :: !Int, -- len of previous token
last_loc :: SrcSpan, -- pos of previous token
last_offs :: !Int, -- offset of the previous token from the
-- beginning of the current line.
-- \t is equal to 8 spaces.
last_len :: !Int, -- len of previous token
- last_line_len :: !Int,
+ last_line_len :: !Int,
loc :: SrcLoc, -- current loc (end of prev token + 1)
extsBitmap :: !Int, -- bitmap that determines permitted extensions
context :: [LayoutContext],
loc :: SrcLoc, -- current loc (end of prev token + 1)
extsBitmap :: !Int, -- bitmap that determines permitted extensions
context :: [LayoutContext],