Skip to content

Commit 153bff0

Browse files
committed
Fix broken macro expansion in #elif conditions
1 parent 2f10785 commit 153bff0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

rezparser/preprocessor.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ def _token_internal(self, *, expand=True):
143143
elif tok == "expansion_end":
144144
self.macro_stack.pop()
145145
continue
146-
elif tok.type == "IDENTIFIER" and self.if_state == "active" and expand:
146+
elif tok.type == "IDENTIFIER" and self.if_state in ("active", "waiting") and expand:
147147
name = tok.value.casefold()
148148
try:
149149
if len(self.macro_stack) > 100:

0 commit comments

Comments
 (0)