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
Status: VERIFIED FIXED
Product: php
Classification: Unclassified
Component: Editor
8.2
All All
: P3 (vote)
: 8.2
Assigned To: junichi11
issues@php
82patch1-verified
:
Depends on:
Blocks:
  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
:


Attachments

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.):

<?php
const callable = 0;
const __TRAIT__ = "__TRAIT__";

Probably, this should be fixed before the issue 262141 is fixed. I'll try it.

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

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

http://hg.netbeans.org/web-main/rev/dccae1d847b6

Thanks.
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 http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/dccae1d847b6
User: Junichi Yamamoto <junichi11@netbeans.org>
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).

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

http://hg.netbeans.org/releases/rev/5c0353286c32

Thanks.
Comment 8 amobilia 2016-12-15 12:13:02 UTC
82patch1-verified


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