Browse Source

Add compiler pass 2 - run remaining functions

We're now back to where we started functionality-wise!
master
Adam Pippin 3 years ago
parent
commit
9f5dda08de
  1. 14
      app/Engine/Cfnpp/Compiler.php

14
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.

Loading…
Cancel
Save