Skip to content

Commit

Permalink
add change log
Browse files Browse the repository at this point in the history
  • Loading branch information
cocolato committed Oct 24, 2024
1 parent c5aafa1 commit 8945ad2
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
10 changes: 10 additions & 0 deletions doc/build/unreleased/140.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
.. change::
:tags: bug, lexer, codegen
:tickets: 140

During the lexical analysis phase, add an additional
prefix for undeclared identifiers that have the same name
as built-in flags, and determine the final filter to be used
during the code generation phase based on the context
provided by the user.
Pull request by Hai Zhu.
4 changes: 0 additions & 4 deletions mako/pyparser.py
Original file line number Diff line number Diff line change
Expand Up @@ -198,16 +198,12 @@ def visit_Tuple(self, node):
p.declared_identifiers
)
lui = self.listener.undeclared_identifiers
# self.listener.undeclared_identifiers = lui.union(
# p.undeclared_identifiers
# )
undeclared_identifiers = lui.union(p.undeclared_identifiers)
conflict_identifiers = undeclared_identifiers.intersection(
DEFAULT_ESCAPES
)
if conflict_identifiers:
_map = {i: CONFLICT_PREFIX + i for i in conflict_identifiers}
# for k, v in _map.items():
for i, arg in enumerate(self.listener.args):
if arg in _map:
self.listener.args[i] = _map[arg]
Expand Down

0 comments on commit 8945ad2

Please sign in to comment.