nodes: assignments are not pure if the value is not None

This commit is contained in:
Antoine Viallon 2023-05-24 00:13:56 +02:00
parent 067dc7f982
commit f08d697699
Signed by: aviallon
GPG key ID: D126B13AB555E16F

View file

@ -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