feature request #1254275: Array type hinting gives parser error
authoraxelcl <axelcl>
Mon, 2 Jan 2006 05:14:07 +0000 (05:14 +0000)
committeraxelcl <axelcl>
Mon, 2 Jan 2006 05:14:07 +0000 (05:14 +0000)
net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/compiler/parser/Parser.java

index 69dfdcf..95c4fd6 100644 (file)
@@ -757,10 +757,11 @@ public class Parser implements ITerminalSymbols, CompilerModifiers, ParserBasicI
                        expressionList();
                        if (token == TokenNameSEMICOLON) {
                                getNextToken();
-//                             if (token != TokenNameINLINE_HTML) {
-//                                     // TODO should this become a configurable warning?
-//                                     reportSyntaxError("Probably '?>' expected  after PHP short tag expression (only the first expression will be echoed).");
-//                             }
+                               // if (token != TokenNameINLINE_HTML) {
+                               // // TODO should this become a configurable warning?
+                               // reportSyntaxError("Probably '?>' expected after PHP short tag
+                               // expression (only the first expression will be echoed).");
+                               // }
                        } else {
                                if (token != TokenNameINLINE_HTML) {
                                        throwSyntaxError("';' expected after PHP short tag '<?=' expression.");
@@ -1659,10 +1660,10 @@ public class Parser implements ITerminalSymbols, CompilerModifiers, ParserBasicI
                // | non_empty_parameter_list ',' optional_class_type T_VARIABLE '='
                // static_scalar
                char[] typeIdentifier = null;
-               if (token == TokenNameIdentifier || token == TokenNameVariable || token == TokenNameAND) {
+               if (token == TokenNameIdentifier || token == TokenNamearray || token == TokenNameVariable || token == TokenNameAND) {
                        HashSet set = peekVariableSet();
                        while (true) {
-                               if (token == TokenNameIdentifier) {
+                               if (token == TokenNameIdentifier || token == TokenNamearray) {// feature req. #1254275
                                        typeIdentifier = scanner.getCurrentIdentifierSource();
                                        getNextToken();
                                }