|
@ -235,12 +235,18 @@ class Compiler implements \App\Engine\ICompile |
|
|
$stack = array_merge($stack, $node->getChildren()); |
|
|
$stack = array_merge($stack, $node->getChildren()); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// We're really only handling one case here right now |
|
|
|
|
|
if ($node instanceof NodeFunctionValue && |
|
|
if ($node instanceof NodeFunctionValue && |
|
|
$node->getName() == 'var') |
|
|
$node->getName() == 'var') |
|
|
{ |
|
|
{ |
|
|
$variables[] = $node->getValue(); |
|
|
$variables[] = $node->getValue(); |
|
|
} |
|
|
} |
|
|
|
|
|
elseif ($node instanceof NodeFunctionValue && |
|
|
|
|
|
$node->getName() == 'expr') |
|
|
|
|
|
{ |
|
|
|
|
|
$parser = new \App\Engine\Cfnpp\Expression\Parser(); |
|
|
|
|
|
$expression = $parser->parse($node->getValue()); |
|
|
|
|
|
$variables = array_merge($variables, $expression->getReferencedVariables()); |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
return $variables; |
|
|
return $variables; |
|
|