function enterSnipCaller(SnipCaller $node) { while (($next = $node->getNextSibling()) instanceof PlaceholderValue) { $node->addChild($next); } $mustValueType = false; if ($node->hasChilds()) { foreach ($node->getChilds() as $child) { if ($child instanceof PlaceholderValue) { $mustValueType = true; } else { if ($mustValueType) { throw new SyntaxErrorException('if one placeholdervalue child exists, all children of SnipCaller must be placeholdervalue'); } } } } }