diff --git a/lib/Node/Stmt/Goto.php b/lib/Node/Stmt/Goto.php index 9a7d2cc..9b334e1 100644 --- a/lib/Node/Stmt/Goto.php +++ b/lib/Node/Stmt/Goto.php @@ -1,5 +1,8 @@ expr ? ' ' . $this->p($node->expr) : ''); } + public function pStmt_Label(Node_Stmt_Label $node) { + return $node->name . ':'; + } + + public function pStmt_Goto(Node_Stmt_Goto $node) { + return 'goto ' . $node->name; + } + // Other public function pStmt_Echo(Node_Stmt_Echo $node) { diff --git a/lib/PrettyPrinterAbstract.php b/lib/PrettyPrinterAbstract.php index aead286..340aca7 100644 --- a/lib/PrettyPrinterAbstract.php +++ b/lib/PrettyPrinterAbstract.php @@ -82,6 +82,7 @@ abstract class PrettyPrinterAbstract || $node instanceof Node_Stmt_Switch || $node instanceof Node_Stmt_While || $node instanceof Node_Stmt_TryCatch + || $node instanceof Node_Stmt_Label ) { $return .= "\n"; } else {