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 9327af8..21cdb6f 100644 --- a/net.sourceforge.phpeclipse/src/test/PHPParser.jj +++ b/net.sourceforge.phpeclipse/src/test/PHPParser.jj @@ -280,7 +280,7 @@ PARSER_END(PHPParser) SPECIAL_TOKEN : { - "//" : IN_SINGLE_LINE_COMMENT + "//" | "#" : IN_SINGLE_LINE_COMMENT | <"/**" ~["/"]> { input_stream.backup(1); } : IN_FORMAL_COMMENT | @@ -832,7 +832,17 @@ void MethodDeclaration() : final PHPFunctionDeclaration functionDeclaration; } { - functionDeclaration = MethodDeclarator() + + try { + functionDeclaration = MethodDeclarator() + } catch (ParseException e) { + if (errorMessage != null) { + throw e; + } + errorMessage = "unexpected token : '"+ e.currentToken.next.image +"', function identifier expected"; + errorLevel = ERROR; + throw e; + } { if (currentSegment != null) { currentSegment.add(functionDeclaration);