@solve.implementation(for_type=ast.Var)<EOL>def solve_var(expr, vars):
try:<EOL><INDENT>return Result(structured.resolve(vars, expr.value), ())<EOL><DEDENT>except (KeyError, AttributeError) as e:<EOL><INDENT>raise errors.EfilterKeyError(root=expr, key=expr.value, message=e,<EOL>query=expr.source)<EOL><DEDENT>except (TypeError, ValueError) as e:<EOL><INDENT>if vars.locals is None:<EOL><INDENT>raise errors.EfilterNoneError(<EOL>root=expr, query=expr.source,<EOL>message="<STR_LIT>" % expr.value)<EOL><DEDENT>else:<EOL><INDENT>raise errors.EfilterTypeError(<EOL>root=expr, query=expr.source,<EOL>message="<STR_LIT>" % (e, vars))<EOL><DEDENT><DEDENT>except NotImplementedError as e:<EOL><INDENT>raise errors.EfilterError(<EOL>root=expr, query=expr.source,<EOL>message="<STR_LIT>" %<EOL>(expr.value, type(vars)))<EOL><DEDENT>
Returns the value of the var named in the expression.