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
I made a quick fix in expand_macros to prevent infante recursion:
defexpand_macros(self,tokens,expanding_from=[]):
"""Given a list of tokens, this function performs macro expansion."""# Each token needs to track from which macros it has been expanded from to prevent recursionfortokintokens:
ifnothasattr(tok, 'expanded_from'):
tok.expanded_from= []
iflen(expanding_from) ==1andtok.value==expanding_from[0]:
returntokensi=0
Not sure whether this is the correct, hope this issue can be addressed on master.
The text was updated successfully, but these errors were encountered:
I met a RecursionError when running this project on
pcre2
An fatal error occurs:
I tracked the code and it was caused by :
https://github.com/PCRE2Project/pcre2/blob/master/src/pcre2.h.in#L806, the self referential macros was used.
I made a quick fix in
expand_macros
to prevent infante recursion:Not sure whether this is the correct, hope this issue can be addressed on master.
The text was updated successfully, but these errors were encountered: