Improve error message related to usage variables starting with '_'
This commit is contained in:
@@ -9,7 +9,7 @@ class AssignmentEvaluator(Evaluator):
|
||||
def evaluator(cls, node, environment):
|
||||
target = node.target.value
|
||||
if target.startswith("_"):
|
||||
raise RuntimeException("Usage of variables with names starting with '_' is not allowed", node.target.pos)
|
||||
raise RuntimeException("Declaration and assignation variables with names starting with '_' is not allowed", node.target.pos)
|
||||
|
||||
value = expressionEvaluator(doAssert=True)(node.value, environment).value #TODO check if it isn't necessary to verify 'result' attr of EvaluatioNResult
|
||||
scopeOfExistingVariable = environment.findVariableScope(target)
|
||||
|
||||
Reference in New Issue
Block a user