protected function compile($expr, Context $context)
{
$variable = $context->getSymbol($expr->name);
if ($variable) {
$variable->incGets();
return new CompiledExpression($variable->getType(), $variable->getValue(), $variable);
}
$context->notice('undefined-variable', sprintf('You are trying to use an undefined variable $%s', $expr->name), $expr);
return new CompiledExpression();
}