Commit 7e37fe43 by Zachary Snow

fix nested conditional preprocessor directives

parent 848f8cbd
...@@ -21,7 +21,7 @@ isNewline :: Token -> Bool ...@@ -21,7 +21,7 @@ isNewline :: Token -> Bool
isNewline (Token t _ _) = t == Spe_Newline isNewline (Token t _ _) = t == Spe_Newline
unskippableDirectives :: [String] unskippableDirectives :: [String]
unskippableDirectives = ["else", "elsif", "endif"] unskippableDirectives = ["else", "elsif", "endif", "ifdef", "ifndef"]
preprocess :: [Token] -> (StateT PP IO) [Token] preprocess :: [Token] -> (StateT PP IO) [Token]
preprocess tokens = pp tokens >>= return . combineNumbers preprocess tokens = pp tokens >>= return . combineNumbers
......
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