Introduce new parser token PU_identifier
commited2304454e2b63321f4d34d31bfc4ed34b074359
authorVincent Siles <vsiles@fb.com>
Mon, 18 Mar 2019 18:03:42 +0000 (18 11:03 -0700)
committerHhvm Bot <hhvm-bot@users.noreply.github.com>
Mon, 18 Mar 2019 18:08:34 +0000 (18 11:08 -0700)
tree541b2608ac7d927fc2206afd25530d15cb212595
parentba59ea881e724f9b6f530528dd723a4b12ffa9b7
Introduce new parser token PU_identifier

Summary:
In order to be able to locally detect calls to PU expression (was
`Class::Field::expr`, now is `Class:Field::expr`), and new parsing rule
is introduced to directly create a `PU_identifier` from the source code.

Previously we where scannin for special `Class_const(Class_const _)` pattern
to build them _after_ the parsing was done.

Reviewed By: CatherineGasnier

Differential Revision: D14421012

fbshipit-source-id: ffb5c5e0ed33e7905dea8addcf3bc427f2ffa775
34 files changed:
hphp/hack/src/facts/flatten_smart_constructors.ml
hphp/hack/src/hackfmt/hack_format.ml
hphp/hack/src/hhbc/closure_convert.ml
hphp/hack/src/hhbc/emit_expression.ml
hphp/hack/src/hhbc/hhbc_hhas.ml
hphp/hack/src/naming/ast_to_nast.ml
hphp/hack/src/naming/naming.ml
hphp/hack/src/parser/ast.ml
hphp/hack/src/parser/ast_check.ml
hphp/hack/src/parser/ast_visitor.ml
hphp/hack/src/parser/full_fidelity_ast.ml
hphp/hack/src/parser/full_fidelity_expression_parser.ml
hphp/hack/src/parser/full_fidelity_operator.ml
hphp/hack/src/parser/full_fidelity_parser_errors.ml
hphp/hack/src/parser/full_fidelity_parser_helpers.ml
hphp/hack/src/parser/full_fidelity_syntax.ml
hphp/hack/src/parser/full_fidelity_syntax_error.ml
hphp/hack/src/parser/full_fidelity_syntax_error.mli
hphp/hack/src/parser/full_fidelity_syntax_kind.ml
hphp/hack/src/parser/full_fidelity_syntax_type.ml
hphp/hack/src/parser/full_fidelity_validated_syntax.ml
hphp/hack/src/parser/js/full_fidelity_editable.js
hphp/hack/src/parser/js/full_fidelity_schema.json
hphp/hack/src/parser/parserSig.ml
hphp/hack/src/parser/schema/schema_definition.ml
hphp/hack/src/parser/smart_constructors/smartConstructors.ml
hphp/hack/src/parser/smart_constructors/smartConstructorsWrappers.ml
hphp/hack/src/parser/smart_constructors/syntaxSmartConstructors.ml
hphp/hack/src/parser/smart_constructors/verifySmartConstructors.ml
hphp/hack/src/parser/syntax_sig.ml
hphp/hack/src/typing/typing.ml
hphp/hack/src/typing/typing_get_locals.ml
hphp/hack/test/pocket_universes/simple.good.php
hphp/hack/test/pocket_universes/simple.good.php.expect