Fixed some bugs in the syntax editor preference page
[phpeclipse.git] / net.sourceforge.phpeclipse / src / test / PHPParser.jj
index 16847d8..35e1229 100644 (file)
@@ -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 = <COLON>
-    {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 {