diff --git a/app/Cfnpp/Functions.php b/app/Cfnpp/Functions.php index 29131a8..6321ce1 100644 --- a/app/Cfnpp/Functions.php +++ b/app/Cfnpp/Functions.php @@ -83,7 +83,10 @@ class Functions */ public function mf_replace(Node $original, Node $target, NodeFunction $function): ?Node { - // TODO: Deal with nodefunctionvalue + if ($function instanceof NodeFunctionValue) + { + return new NodeValue(null, $target->hasName() ? $target->getName() : null, $function->getValue()); + } $replacement = new Node(null, $target->hasName() ? $target->getName() : null); $replacement->setChildren($function->getChildren());