pfff: allow more complex foreach pattern

Summary: Allow foreach($x as $k => list(...))

Test Plan: unit test included

Reviewers: pieter, julienv, amenghra, hannesr

Reviewed By: hannesr

CC: joelm

Differential Revision: https://phabricator.fb.com/D987864

Task ID: 2940086
pfff: allow trailing comma on lexical var list for closures

Test Plan:
unit test included
also
./pfff -parse_php ~/www/flib/platform/graph/resources/adgroup/mutators/__tests__/GraphAdgroupObjectiveInferTestCase.php now works

Reviewers: pieter, julienv, amenghra, hannesr

Reviewed By: hannesr

CC: ptarjan, joelm

Differential Revision: https://phabricator.fb.com/D987904

Task ID: 2940086
pfff: support for shape types

Summary: A few files in www are using that now.

Test Plan:
unit test included
also

$ ~/pfff/pfff -parse_php ~/www/flib/weather/data/CalendarWeather.php
now works

Reviewers: ide, pieter, julienv, amenghra

Reviewed By: julienv

CC: alexeyp, joelm

Differential Revision: https://phabricator.fb.com/D988404

Task ID: 2932011, 2940086