<PHPPARSING> SPECIAL_TOKEN :
{
- "//" : IN_SINGLE_LINE_COMMENT
+ "//" | "#" : IN_SINGLE_LINE_COMMENT
|
<"/**" ~["/"]> { input_stream.backup(1); } : IN_FORMAL_COMMENT
|
final PHPFunctionDeclaration functionDeclaration;
}
{
- <FUNCTION> functionDeclaration = MethodDeclarator()
+ <FUNCTION>
+ 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);