Homec4science

Add coalesce and spaceship operators to xhpast

Authored by Richard van Velzen <rvanvelzen@experty.com> on May 4 2016, 11:02.

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

Committed
Richard van Velzen <rvanvelzen@experty.com>May 19 2016, 10:59
Pushed
aubortMar 17 2017, 12:03
Parents
rPHUb25e0477b280: Allow "+" to remain unescaped by csprintf('%R', ...)
Branches
Unknown
Tags
Unknown

Event Timeline

Richard van Velzen <rvanvelzen@experty.com> committed rPHU4b75e0c34e52: Add coalesce and spaceship operators to xhpast (authored by Richard van Velzen <rvanvelzen@experty.com>).May 19 2016, 10:59