Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 268496 - Missing T_CALLABLE and T_TRAIT_C in the lexer and the parser
Missing T_CALLABLE and T_TRAIT_C in the lexer and the parser
Product: php
Classification: Unclassified
Component: Editor
All All
: P3 (vote)
: 8.2
Assigned To: junichi11
Depends on:
  Show dependency treegraph
Reported: 2016-10-13 04:08 UTC by junichi11
Modified: 2016-12-15 12:13 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT


Note You need to log in before you can comment on or make changes to this bug.
Description junichi11 2016-10-13 04:08:02 UTC
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.

Comment 1 Tomas Mysik 2016-10-13 05:45:37 UTC
Thanks a lot!
Comment 2 junichi11 2016-10-19 01:58:49 UTC

Probably, the print() method was forgotten to add in the PrintASTVisitor.visit(ReturnStatement).
So, I've added it.

Comment 3 Tomas Mysik 2016-10-19 06:18:36 UTC
As always, thanks a lot, Junichi!
Comment 4 junichi11 2016-10-19 22:53:01 UTC
You are welcome :)
Comment 5 Quality Engineering 2016-10-20 01:58:31 UTC
Integrated into 'main-silver', will be available in build *201610200002* on (upload may still be in progress)

User: Junichi Yamamoto <>
Log: #268496 - Missing T_CALLABLE and T_TRAIT_C in the lexer and the parser
Comment 6 Tomas Mysik 2016-12-03 12:33:11 UTC
Marking as a patch candidate as well (needed to harmless hg transplant of other changes to PHP parser).

Comment 7 Tomas Mysik 2016-12-03 14:08:38 UTC
Transplanted to the releases repo branch release82:

Comment 8 amobilia 2016-12-15 12:13:02 UTC

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo