From: jsurfer Date: Thu, 23 Sep 2004 18:44:33 +0000 (+0000) Subject: misc parser fixes X-Git-Url: http://secure.phpeclipse.com misc parser fixes --- 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 f1eb422..aec5e9f 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 @@ -3092,7 +3092,7 @@ public class Parser //extends PHPParserSuperclass // } else { expr(); if (token != TokenNameRBRACKET) { - throwSyntaxError("']' expected after '{$'."); + throwSyntaxError("']' expected."); } getNextToken(); // } @@ -3103,6 +3103,18 @@ public class Parser //extends PHPParserSuperclass throwSyntaxError("String or Variable token expected."); } getNextToken(); + if (token == TokenNameLBRACKET) { + getNextToken(); + // if (token == TokenNameRBRACKET) { + // getNextToken(); + // } else { + expr(); + if (token != TokenNameRBRACKET) { + throwSyntaxError("']' expected after '${'."); + } + getNextToken(); + // } + } } // if (token != TokenNameRBRACE) { // throwSyntaxError("'}' expected after '{$'.");