misc parser fixes
authorjsurfer <jsurfer>
Thu, 23 Sep 2004 18:44:33 +0000 (18:44 +0000)
committerjsurfer <jsurfer>
Thu, 23 Sep 2004 18:44:33 +0000 (18:44 +0000)
net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/parser/Parser.java

index f1eb422..aec5e9f 100644 (file)
@@ -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 '{$'.");