HomePhabricator

Add coalesce and spaceship operators to xhpast

Description

Add coalesce and spaceship operators to xhpast

Summary:

  • $value ?? $other is roughtly translates to isset($value) ? $value : $other
  • $a <=> $b translates to ($a < $b) ? -1 : (($a > $b) ? 1 : 0).

Because these new tokens appear in-between other tokens, a lot of token values were updated. All test cases have been updated to have the correct token values.

Test Plan: Fully rebuild xhpast, run all parser tests.

Reviewers: Blessed Reviewers, epriestley

Reviewed By: Blessed Reviewers, epriestley

Subscribers: Korvin

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

Details

Provenance
richardvanvelzenAuthored on May 4 2016, 9:02 AM
richardvanvelzenPushed on May 19 2016, 8:59 AM
Reviewer
Blessed Reviewers
Differential Revision
D15860: Add coalesce and spaceship operators to xhpast
Parents
rPHUb25e0477b280: Allow "+" to remain unescaped by csprintf('%R', ...)
Branches
Unknown
Tags
Unknown
Build Status
Buildable 12266
Build 15500: Run Core Tests