diff options
author | Moritz Angermann <moritz.angermann@gmail.com> | 2021-06-30 16:45:06 +0800 |
---|---|---|
committer | Moritz Angermann <moritz.angermann@gmail.com> | 2021-06-30 16:45:06 +0800 |
commit | bc6a3e654add2eb955472210866d5dd87bee4f54 (patch) | |
tree | 2575ba982249060ca7806c72d357f6b4f5554536 | |
parent | ea02ffc0174ed17f25d2a00a49d5150e18b53706 (diff) | |
download | haskell-bc6a3e654add2eb955472210866d5dd87bee4f54.tar.gz |
[Parser: Lexer] Fix !6132
clang's cpp injects spaces prior to #!/.
-rw-r--r-- | compiler/GHC/Parser/Lexer.x | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/GHC/Parser/Lexer.x b/compiler/GHC/Parser/Lexer.x index 7c9b951eba..2881e44e90 100644 --- a/compiler/GHC/Parser/Lexer.x +++ b/compiler/GHC/Parser/Lexer.x @@ -283,7 +283,8 @@ $tab { warnTab } ^\# line { begin line_prag1 } ^\# / { followedByDigit } { begin line_prag1 } ^\# pragma .* \n ; -- GCC 3.3 CPP generated, apparently - ^\# \! .* \n ; -- #!, for scripts + ^\# \! .* \n ; -- #!, for scripts -- gcc + ^\ \# \! .* \n ; -- #!, for scripts -- clang; See #6132 () { do_bol } } |