Commit b660cfbd by Zachary Snow

allow tabs in preprocessor directives

parent 167c65db
...@@ -682,12 +682,15 @@ takeChar = do ...@@ -682,12 +682,15 @@ takeChar = do
dropSpaces :: Alex () dropSpaces :: Alex ()
dropSpaces = do dropSpaces = do
(pos, _, _, str) <- alexGetInput (pos, _, _, str) <- alexGetInput
case str of if null str then
' ' : rest -> do return ()
alexSetInput (alexMove pos ' ', ' ', [], rest) else do
let ch : rest = str
if ch == '\t' || ch == ' ' then do
alexSetInput (alexMove pos ch, ch, [], tail str)
dropSpaces dropSpaces
[] -> return () else
_ -> return () return ()
isWhitespaceChar :: Char -> Bool isWhitespaceChar :: Char -> Bool
isWhitespaceChar ch = elem ch [' ', '\t', '\n'] isWhitespaceChar ch = elem ch [' ', '\t', '\n']
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment