diff options
author | Stefan Behnel <stefan_ml@behnel.de> | 2021-07-13 20:00:04 +0200 |
---|---|---|
committer | Stefan Behnel <stefan_ml@behnel.de> | 2021-07-13 21:54:44 +0200 |
commit | f355001d407e0fb5598e3aea88a66d68c02e7891 (patch) | |
tree | 84d98948b235dcb4c1797eace08f6504357edd3c | |
parent | bd4f948d0b80e3f23b1a0c61216eedf35879d727 (diff) | |
download | cython-f355001d407e0fb5598e3aea88a66d68c02e7891.tar.gz |
Set the "is_target" attribute for names, attributes and temps (anything name-like) to preserve that information for later pipeline steps.
-rw-r--r-- | Cython/Compiler/ExprNodes.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Cython/Compiler/ExprNodes.py b/Cython/Compiler/ExprNodes.py index 33970ddd9..de50bca88 100644 --- a/Cython/Compiler/ExprNodes.py +++ b/Cython/Compiler/ExprNodes.py @@ -2078,6 +2078,7 @@ class NameNode(AtomicExprNode): return None def analyse_target_declaration(self, env): + self.is_target = True if not self.entry: self.entry = env.lookup_here(self.name) if not self.entry and self.annotation is not None: @@ -3210,7 +3211,7 @@ class TempNode(ExprNode): return self def analyse_target_declaration(self, env): - pass + self.is_target = True def generate_result_code(self, code): pass @@ -6971,7 +6972,7 @@ class AttributeNode(ExprNode): return self.type def analyse_target_declaration(self, env): - pass + self.is_target = True def analyse_target_types(self, env): node = self.analyse_types(env, target = 1) |