@param Stmt\Case_ $node

@return string
550810
public function pStmt_Case(Stmt\Case_ $node)
    {
        return sprintf(
            "%s:%s",
            (null !== $node->cond ? 'case ' . $this->p($node->cond) : 'default'),
            $this->pStmts($node->stmts)
        );
    }
294086
public function getValueForNode(Node $node)
    {
        if ($node->isNamed()) {
            return $node->getUri();
        } elseif ($node->isLiteral()) {
            return $node->getValue();
        } elseif ($node->isBlank()) {
            return $node->getBlankId();
        } else {
            return null;
        }
    }
1238775
private function getExpression(Node $node) {
		if ($node instanceof ConstFetch) {
			$const = $node->name->parts[0];
			if (isset($this->constMap[$const])) {
				return $this->constMap[$const];
			}
	
			return $const;
		}
		
		if ($node instanceof ClassConstFetch) {
			return $node->class->parts[0] . '::' . $node->name;
		}
	
		if ($node instanceof MagicConst) {
			return $node->getName();
		}
		
		if ($node instanceof Array_) {
			$prettyPrinter = new PrettyPrinter();
			return $prettyPrinter->prettyPrintExpr($node);
		}
	}
498232
public function _body($node) {
		$params = '';
		if (isset($node['@attrib'])) {
			$params = $this->resolveAttr($node['@attrib']);
			unset($node['@attrib']);
		}
		$content = array();
		// bypass inner content nodes
		foreach ($node as $el)
			$content[] = $this->template->build($el);
		return '<body'.$params.'>'.implode("\n", $content)."\n".
			$this->render('footer')."\n".'</body>';
	}
720207
public function compile(Node $node) : string
    {
        $this->head = $this->body = '';
        $node->compile($this);
        return $this->getResult();
    }
482189
public function resolveReferenceNodeToFqn(Node $node)
    {
        // TODO all name tokens should be a part of a node
        if ($node instanceof Node\QualifiedName) {
            return $this->resolveQualifiedNameNodeToFqn($node);
        } else if ($node instanceof Node\Expression\MemberAccessExpression) {
            return $this->resolveMemberAccessExpressionNodeToFqn($node);
        } else if (ParserHelpers\isConstantFetch($node)) {
            return (string)($node->getNamespacedName());
        } else if (
            // A\B::C - constant access expression
            $node instanceof Node\Expression\ScopedPropertyAccessExpression
            && !($node->memberName instanceof Node\Expression\Variable)
        ) {
            return $this->resolveScopedPropertyAccessExpressionNodeToFqn($node);
        } else if (
            // A\B::$c - static property access expression
            $node->parent instanceof Node\Expression\ScopedPropertyAccessExpression
        ) {
            return $this->resolveScopedPropertyAccessExpressionNodeToFqn($node->parent);
        }

        return null;
    }
204816
protected function compileExpression(Node $node)
    {

        $code = $node->escaped ? 'htmlentities(%s, \\ENT_QUOTES, \''.$this->options['escape_charset'].'\')' : '%s';

        $value = rtrim(trim($node->value), ';');

        if ($this->isVariable($value) && !$node->unchecked)
            $value = "isset({$value}) ? {$value} : ''";

        return $this->createShortCode(sprintf($code, $value));
    }
333145
protected function htmlFromNode($node)
    {
        $domDocument = new \DOMDocument();
        $newNode = $domDocument->importNode($node, true);
        $domDocument->appendChild($newNode);

        return $domDocument->saveHTML();
    }
145567
public function leaveNode(Node $node)
    {
        if ($node instanceof Expr\ClassConstFetch
            && $node->name === 'class'
        ) {
            $class = $node->class;
            if (strcmp($class->toString(), 'static') === 0
                || strcmp($class->toString(), 'self') === 0
            ) {
                $name = Name::concat($this->namespaceNode, $this->classNode->name);
                return new Scalar\String_(trim($name->toString(), '\\'));
                // return new Expr\FuncCall(new Name('get_class'));
            }
            if ($class->isFullyQualified()) {
                return new Scalar\String_(trim($class->toString(), '\\'));
            }
            $prefix = $this->namespaceNode;
            foreach ($this->importNodes as $import) {
                if (strcmp($class->getFirst(), $import->getLast()) === 0) {
                    $prefix = $import->toString();
                    array_shift($class->parts);
                    break;
                }
            }
            $name = Name::concat($prefix, $class);
            return new Scalar\String_(trim($name->toString(), '\\'));
        }
    }
882236
protected function transpileDirectiveNode(Node $node) : string
    {
        $children = $node->getChildren();

        if (count($children) === 0) {
            return '';
        }

        $directiveName = $children[0]->getValue();
        $expression = count($children) === 2 ? $children[1]->getValue() : '';

        if (!isset($this->directiveTranspilers[$directiveName])) {
            throw new RuntimeException(
                sprintf(
                    'No transpiler registered for directive "%s"',
                    $directiveName
                )
            );
        }

        return $this->directiveTranspilers[$directiveName]($expression);
    }
862122
public function pStmt_Goto(Stmt\Goto_ $node)
    {
        return sprintf(
            '%s %s;',
            $this->color('goto', SyntaxHighlighterConfig::TYPE_KEYWORD),
            $node->name
        );
    }
385658
private static function getContainingClassFqn(Node $node)
    {
        $classNode = $node->getFirstAncestor(Node\Statement\ClassDeclaration::class);
        if ($classNode === null) {
            return null;
        }
        return (string)$classNode->getNamespacedName();
    }
1010499
public function pStmt_Throw(Stmt\Throw_ $node)
    {
        return sprintf(
            '%s %s;',
            $this->color('throw', SyntaxHighlighterConfig::TYPE_KEYWORD),
            $this->p($node->expr)
        );
    }
297232
@Override
    public R visitCase(CaseTree node, P p) {
        R r = scan(node.getExpression(), p);
        r = scanAndReduce(node.getStatements(), p, r);
        return r;
    }
466917
protected static function getInnerHTML($node) {
		if(!$node)
			return null;
		$innerHTML= ''; 
		$children = $node->childNodes; 
		foreach ($children as $child)
			$innerHTML .= $child->ownerDocument->saveHTML($child);
		return $innerHTML; 
	}
1372936
public function pStmt_Catch(Stmt\Catch_ $node)
    {
        return sprintf(
            " %s (%s $%s) %s%s\n%s",
            $this->color('catch', SyntaxHighlighterConfig::TYPE_KEYWORD),
            $this->p($node->type),
            $node->var,
            $this->color('{', SyntaxHighlighterConfig::TYPE_BRACE),
            $this->pStmts($node->stmts),
            $this->color('}', SyntaxHighlighterConfig::TYPE_BRACE)
        );
    }
538996
public function enterNode(Node $node)
    {
        if ($node instanceof ConstFetch || $node instanceof FuncCall) {
            $node->name = null;
        }

        if ($node instanceof FullyQualified) {
            $this->names[] = $node->toString();
        }

        return $node;
    }