X-Git-Url: http://git.phpeclipse.com 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 f30009d..41a9404 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 @@ -2467,13 +2467,15 @@ public class Parser //extends PHPParserSuperclass //| static_member '(' function_call_parameter_list ')' //| variable_without_objects '(' function_call_parameter_list ')' char[] defineName = null; + char[] ident = null; int startPos=0; int endPos=0; if (Scanner.TRACE) { System.out.println("TRACE: function_call()"); } if (token == TokenNameIdentifier) { - defineName = scanner.getCurrentIdentifierSource(); + ident = scanner.getCurrentIdentifierSource(); + defineName = ident; startPos = scanner.getCurrentTokenStartPosition(); endPos = scanner.getCurrentTokenEndPosition(); getNextToken(); @@ -2545,7 +2547,13 @@ public class Parser //extends PHPParserSuperclass } non_empty_function_call_parameter_list(); if (token != TokenNameRPAREN) { - throwSyntaxError("')' expected in function call."); + String functionName; + if (ident==null) { + functionName = new String(" "); + } else { + functionName = new String(ident); + } + throwSyntaxError("')' expected in function call ("+functionName+")."); } getNextToken(); } @@ -3090,8 +3098,9 @@ public class Parser //extends PHPParserSuperclass // } } else if (token == TokenNameMINUS_GREATER) { getNextToken(); - if (token != TokenNameIdentifier) { - throwSyntaxError("String token expected."); + if (token != TokenNameIdentifier && + token != TokenNameVariable) { + throwSyntaxError("String or Variable token expected."); } getNextToken(); }