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())); }
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); } } }