Skip to content
This repository has been archived by the owner on Jun 4, 2019. It is now read-only.

pfff-0.29

Latest
Compare
Choose a tag to compare
@aryx aryx released this 13 Mar 20:24
· 128 commits to master since this release
[pfff] support type constant definitions/declarations

Summary:
This is diff 2/2; it adds support for declaring type consts in classes. I'm
reusing some of the AST constructs for `type` and `newtype`, and wrapping
them in a new type of const declaration.

This also adds one or two `%left` precedence thingies, these seem to
give ocamlyacc the right idea about "these are not the shift/reduce
conflicts you're looking for." It takes us from 5 reported conflicts
in the grammar to just the original 1. I'll need to test this change
separately to make sure it doesn't cause sadness.

Depends on D1880752.

Test Plan:
  make tests
  # this fails if I add an intentional parse error to good_tconst_decl.php

This test case should also cover the syntax introduced in D1880752; please
let me know if something looks inadequately covered.

Will run this on www when I get to the office.

Reviewers: dominik, dreeves

Reviewed By: dreeves

Subscribers: dominik

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

Tasks: 6358822

Signature: t1:1880760:1425321537:0d8da37962d49d524431d9d04106c5055c8d4ed8