Lines Matching refs:variables
34 def getVariable(name, variables, pos): argument
35 if name in variables:
36 return variables[name]
38 Logger.testFailed("Missing definition of variable \"{}\"".format(name), pos, variables)
40 def setVariable(name, value, variables, pos): argument
41 if name not in variables:
42 return variables.copyWith(name, value)
44 Logger.testFailed("Multiple definitions of variable \"{}\"".format(name), pos, variables)
46 def matchWords(checkerWord, stringWord, variables, pos): argument
53 pattern = re.escape(getVariable(expression.name, variables, pos))
65 variables = setVariable(expression.name, stringWord[:match.end()], variables, pos)
74 return variables
76 def MatchLines(checkerLine, stringLine, variables): argument
93 newVariables = matchWords(checkerWord, stringWord, variables, checkerLine)
96 variables = newVariables
102 return variables
104 def getEvalText(expression, variables, pos): argument
109 return getVariable(expression.name, variables, pos)
111 def EvaluateLine(checkerLine, variables): argument
113 eval_string = "".join(map(lambda expr: getEvalText(expr, variables, checkerLine),