Ejemplo n.º 1
0
 public static function clearAfterWhitespace(Node $aObject)
 {
     if (!($aParent = $aObject->parent()) or !($aBrother = $aParent->childAfter($aObject))) {
         return;
     }
     if (!$aBrother instanceof Text) {
         return;
     }
     $aBrother->setSource(preg_replace("/^\\s+/", '', $aBrother->source()));
 }
Ejemplo n.º 2
0
 public function compileChildren(Node $aNode, ObjectContainer $aObjectContainer, TargetCodeOutputStream $aDev, CompilerManager $aCompilerManager)
 {
     foreach ($aNode->childElementsIterator() as $aObject) {
         if ($aCompiler = $aCompilerManager->compiler($aObject)) {
             $aCompiler->compile($aObject, $aObjectContainer, $aDev, $aCompilerManager);
         }
     }
 }