nodes: assignments are not pure if the value is not None
This commit is contained in:
parent
067dc7f982
commit
f08d697699
1 changed files with 4 additions and 0 deletions
|
|
@ -400,6 +400,10 @@ class Assignment(Node):
|
|||
def _values(self) -> list[Node | Any]:
|
||||
return [self.identifier, self.value]
|
||||
|
||||
@property
|
||||
def pure(self) -> bool:
|
||||
return self.value is None
|
||||
|
||||
def semantic_analysis(self, context: semantic.Context):
|
||||
super(Assignment, self).semantic_analysis(context)
|
||||
name = self.identifier.value
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue