File tree Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -132,8 +132,22 @@ def lexer(self, line):
132
132
self .exit_error (self .escapeChar + 'else' )
133
133
else :
134
134
self .__ifblocks [- 1 ]= not (self .__ifblocks [- 1 ])#self.search_defines(self.__ifconditions[-1]))
135
- return False , True
136
- # handle #endif..
135
+ return False , True
136
+ # handle #endif..
137
+ # handle #endififdef
138
+ elif line [:11 ] == self .escapeChar + 'endififdef' :
139
+ if len (line .split ()) != 2 :
140
+ self .exit_error (self .escapeChar + 'endififdef' )
141
+ else :
142
+ if len (self .__ifconditions )>= 1 :
143
+ self .__ifblocks .pop (- 1 )
144
+ self .__ifcondition = self .__ifconditions .pop (- 1 )
145
+ else :
146
+ self .__ifblocks = []
147
+ self .__ifconditions = []
148
+ self .__ifblocks .append (self .search_defines (line .split ()[1 ]))
149
+ self .__ifconditions .append (line .split ()[1 ])
150
+ return False , True
137
151
# handle #endifall directives
138
152
elif line [:9 ] == self .escapeChar + 'endifall' :
139
153
if len (line .split ()) != 1 :
You can’t perform that action at this time.
0 commit comments