From: khartlage Date: Fri, 23 Jul 2004 19:53:54 +0000 (+0000) Subject: fixed switch { .. default: case 'test': ... bug X-Git-Url: http://secure.phpeclipse.com?hp=127130e4b82841859165d45b0216b426ba1f90d4 fixed switch { .. default: case 'test': ... bug --- diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/parser/Parser.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/parser/Parser.java index f668f45..f30009d 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/parser/Parser.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/parser/Parser.java @@ -1608,7 +1608,7 @@ public class Parser //extends PHPParserSuperclass // statementList(); // } else { - throwSyntaxError("':' character after 'case' constant expected (Found token: " + scanner.toStringAction(token) + ")"); + throwSyntaxError("':' character expected after 'case' constant (Found token: " + scanner.toStringAction(token) + ")"); } } else { // TokenNamedefault getNextToken(); @@ -1618,9 +1618,11 @@ public class Parser //extends PHPParserSuperclass // empty default case break; } - statementList(); + if (token != TokenNamecase) { + statementList(); + } } else { - throwSyntaxError("':' character after 'default' expected."); + throwSyntaxError("':' character expected after 'default'."); } } } while (token == TokenNamecase || token == TokenNamedefault);