T_CALLABLE(callable) and T_TRAIT_C(__TRAIT__) can be used since PHP5.4. But they are missing in the lexer and the parser. So, the following code is not marked as errors (If they are in a global context, they are syntax errors even if PHP7 is used.):
const callable = 0;
const __TRAIT__ = "__TRAIT__";
Probably, this should be fixed before the issue 262141 is fixed. I'll try it.
Thanks a lot!
Probably, the print() method was forgotten to add in the PrintASTVisitor.visit(ReturnStatement).
So, I've added it.
As always, thanks a lot, Junichi!
You are welcome :)
Integrated into 'main-silver', will be available in build *201610200002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
User: Junichi Yamamoto <firstname.lastname@example.org>
Log: #268496 - Missing T_CALLABLE and T_TRAIT_C in the lexer and the parser
Marking as a patch candidate as well (needed to harmless hg transplant of other changes to PHP parser).
Transplanted to the releases repo branch release82: