facebook/pfff — pull request #100 by jeffrafter (2014-11-24 05:19:40+00:00)
Title: Disambiguate PHP shortform ternary

This should fix #56

The current PHP parsing did not support short from ternary (`?:`) with an immediate token such as `true` or `false` following it. I copied the ruleset from https://github.com/facebook/hhvm/blob/master/hphp/parser/hphp.ll#L515 (except for the _maybe_ states) and tried to implement a better lookahead.

I am not sure I did this in the correct/most efficient way and welcome comments/suggestions.