You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: rezparser/preprocessor.py
+10-11Lines changed: 10 additions & 11 deletions
Original file line number
Diff line number
Diff line change
@@ -75,12 +75,12 @@ def print_func(arg):
75
75
pass
76
76
self.print_func=print_func
77
77
78
-
# Sequence of tokens that were produced by a macro expansion and not yet consumed.
78
+
# Sequence ("reverse stack") of tokens that were produced by a macro expansion and not yet consumed.
79
79
# Can also contain the string "expansion_end" to mark the end of a macro expansion, these markers are only used internally to track macro expansion depth and are otherwise ignored.
80
-
self.expansion_queue= []
80
+
self.expansion_stack= []
81
81
82
-
# Current macro expansion depth. Is increased when a macro is expanded, and decreased when the corresponding "expansion_end" marker is hit. If this number grows too high, the preprocessor errors out.
83
-
self.expansion_depth=0
82
+
# Sequence (stack) of the names of all macros that are currently being expanded. Names are pushed when they are expanded, and popped whenever an "expansion_end" marker is hit. If this stack grows too large, the preprocessor errors out.
83
+
self.macro_stack=[]
84
84
85
85
# Sequence (stack) of strings representing the state of all conditional blocks enclosing the current block. Valid values are:
86
86
# * "waiting": An inactive block in a chain where no active block has been found yet.
0 commit comments