equal
deleted
inserted
replaced
90 |
90 |
91 ifdef = do |
91 ifdef = do |
92 s <- try (string "IFDEF") <|> try (string "IFNDEF") |
92 s <- try (string "IFDEF") <|> try (string "IFNDEF") |
93 let f = if s == "IFNDEF" then not else id |
93 let f = if s == "IFNDEF" then not else id |
94 |
94 |
95 spaces |
95 ds <- (spaces >> identifier) `sepBy` (spaces >> string "OR") |
96 d <- identifier |
|
97 spaces |
96 spaces |
98 char' '}' |
97 char' '}' |
99 |
98 |
100 updateState $ \(m, b) -> |
99 updateState $ \(m, b) -> |
101 (m, (f $ d `Map.member` m) : b) |
100 (m, (f $ any (flip Map.member m) ds) : b) |
102 |
101 |
103 return "" |
102 return "" |
104 |
103 |
105 if' = do |
104 if' = do |
106 try (string' "IF" >> notFollowedBy alphaNum) |
105 try (string' "IF" >> notFollowedBy alphaNum) |