X-Git-Url: http://secure.phpeclipse.com diff --git a/net.sourceforge.phpeclipse/src/test/PHPParser.jj b/net.sourceforge.phpeclipse/src/test/PHPParser.jj index 16847d8..35e1229 100644 --- a/net.sourceforge.phpeclipse/src/test/PHPParser.jj +++ b/net.sourceforge.phpeclipse/src/test/PHPParser.jj @@ -2048,7 +2048,9 @@ final Token token,lparen; } processParseExceptionDebug(e); } - {return new FunctionCall(func,args,args[args.length-1].sourceEnd);} + { + int sourceEnd = (args == null && args.length != 0) ? lparen.sourceEnd+1 : args[args.length-1].sourceEnd; + return new FunctionCall(func,args,sourceEnd);} } /** @@ -2844,7 +2846,6 @@ Expression SwitchLabel() : } try { token = - {return expr;} } catch (ParseException e) { errorMessage = "':' expected after case expression"; errorLevel = ERROR; @@ -2852,6 +2853,7 @@ Expression SwitchLabel() : errorEnd = expr.sourceEnd+1; processParseExceptionDebug(e); } + {return expr;} | token = <_DEFAULT> try {