From 43ec5e19d2c52e47c5c50d944da066346d5488b8 Mon Sep 17 00:00:00 2001 From: khartlage Date: Fri, 23 Jul 2004 19:53:54 +0000 Subject: [PATCH 1/1] fixed switch { .. default: case 'test': ... bug --- .../phpdt/internal/compiler/parser/Parser.java | 8 +++++--- 1 files changed, 5 insertions(+), 3 deletions(-) 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); -- 1.7.1