From: simonmar Date: Tue, 2 Jan 2001 14:02:16 +0000 (+0000) Subject: [project @ 2001-01-02 14:02:16 by simonmar] X-Git-Tag: Approximately_9120_patches~2993 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=a52dc4b852e433d00aa1c79acc41bb92f39e66d7;p=ghc-hetmet.git [project @ 2001-01-02 14:02:16 by simonmar] Be a bit stricter about what we treat as a #line pragma. --- diff --git a/ghc/compiler/parser/Lex.lhs b/ghc/compiler/parser/Lex.lhs index def163d..3ff951a 100644 --- a/ghc/compiler/parser/Lex.lhs +++ b/ghc/compiler/parser/Lex.lhs @@ -448,7 +448,11 @@ lexer cont buf s@(PState{ -- special GHC extension: we grok cpp-style #line pragmas '#'# | lexemeIndex buf ==# bol -> -- the '#' must be in column 0 - line_prag next_line (stepOn buf) s' + case expandWhile# is_space (stepOn buf) of { buf1 -> + if is_digit (currentChar# buf1) + then line_prag next_line buf1 s' + else is_a_token + } where next_line buf = lexer cont (stepOnUntilChar# buf '\n'#)