Homec4science

Align PHPAST lexer to PHP 5.5.8

Authored by epriestley <git@epriestley.com> on Jan 21 2014, 23:32.

Description

Align PHPAST lexer to PHP 5.5.8

Summary:
Ref T4334. This aligns the lexer (but not the parser) with PHP 5.5.8. It also applies the patch on T3512. This has these positive effects:

  • Fixes binary literals.
  • Fixes empty heredoc.
  • Corrects T_BINARY_CAST into T_STRING_CAST (consistent with 5.5.8).
  • Removes T_UNICODE_CAST (not in 5.5.8).
  • Recognizes keywords trait, __trait__, yield, insteadof, callable.

...these sideways effects:

  • Slightly improves terminal heredocs (previously: parse error; now: bad parse).

...and these negative effects:

  • Breaks the callable test, since callable is now recognized as a keyword but the parser doesn't yet support it.

Test Plan: Rebuilt xhpast, ran unit tests.

Reviewers: btrahan, Firehed

Reviewed By: btrahan

CC: aran

Maniphest Tasks: T4334

Differential Revision: https://secure.phabricator.com/D8032

Details

Committed
epriestley <git@epriestley.com>Jan 21 2014, 23:32
Pushed
aubortMar 17 2017, 12:03
Parents
rPHU2a1a4b020a76: Add PHPAST test for remaining language features
Branches
Unknown
Tags
Unknown

Event Timeline

epriestley <git@epriestley.com> committed rPHU93a29d837130: Align PHPAST lexer to PHP 5.5.8 (authored by epriestley <git@epriestley.com>).Jan 21 2014, 23:32