mirror of https://github.com/m-labs/artiq.git
validators.escape: don't fail on quoted values in lhs.
This commit is contained in:
parent
8751d2ee6c
commit
35acc33ef6
|
@ -268,8 +268,12 @@ class EscapeValidator(algorithm.Visitor):
|
||||||
if region is not None:
|
if region is not None:
|
||||||
region.contract(value_region)
|
region.contract(value_region)
|
||||||
|
|
||||||
|
# If we assign to an attribute of a quoted value, there will be no names
|
||||||
|
# in the assignment lhs.
|
||||||
|
target_names = self._names_of(target) or []
|
||||||
|
|
||||||
# The assigned value should outlive the assignee
|
# The assigned value should outlive the assignee
|
||||||
target_regions = [self._region_of(name) for name in self._names_of(target)]
|
target_regions = [self._region_of(name) for name in target_names]
|
||||||
for target_region in target_regions:
|
for target_region in target_regions:
|
||||||
if not Region.outlives(value_region, target_region):
|
if not Region.outlives(value_region, target_region):
|
||||||
if is_aug_assign:
|
if is_aug_assign:
|
||||||
|
|
Loading…
Reference in New Issue