diff --git a/app/Engine/Cfnpp/Compiler.php b/app/Engine/Cfnpp/Compiler.php index 2d5d2ca..87d7c10 100644 --- a/app/Engine/Cfnpp/Compiler.php +++ b/app/Engine/Cfnpp/Compiler.php @@ -91,6 +91,7 @@ class Compiler implements \App\Engine\ICompile $document = $this->pass_0($documents, $options); $this->pass_1($document, $options); + $this->pass_2($document, $options); return $document; @@ -239,6 +240,19 @@ class Compiler implements \App\Engine\ICompile return $variables; } + /** + * Compiler Pass 2 - Run all remaining functions in the resulting document, + * mutating the passed in document as required. + * + * @param Document $document + * @param IOptions $options + * @return void + */ + protected function pass_2(Document $document, IOptions $options): void + { + $this->runFunctions($document); + } + /** * Performs a basic recursive merge of two dom trees with target overwriting * original.