Syntax
commitec33100be119a8f9ae559734be3043fbe5c108d3
authorKasper Kopec <kasper@fb.com>
Fri, 12 Apr 2019 23:23:22 +0000 (12 16:23 -0700)
committerHhvm Bot <hhvm-bot@users.noreply.github.com>
Fri, 12 Apr 2019 23:30:49 +0000 (12 16:30 -0700)
tree08d3ca77cb4620a061ab20e46016fd3b502e2a9f
parent125acfd3ff135c52421245d3e16f5b04aeb8815f
Syntax

Summary:
This is the main syntax tree structure.

Some dilemmas here:

* proliferation of generics - repeating the generics and bounds everywhere gets tedious. Is there a better way?
* in Rust implementations, `Value` knows how to construct itself (by implementing `SyntaxValueType`). In OCaml, value builder is provided externally (by `WithValueBuilder` functor). Theoretically, the latter approach is more flexible (since you can have two different builders building same value type, while trait can be implemented only in one way). But replicating this in Rust seems to require adding third generic parameter to Syntax, which just just bothers me.

(Note: this ignores all push blocking failures!)

Reviewed By: losvald

Differential Revision: D14195753

fbshipit-source-id: dffa2024541f2185945f8692da40d6007e766ef7
hphp/hack/src/generate_full_fidelity.ml
hphp/hack/src/parser/lib.rs
hphp/hack/src/parser/syntax.rs [new file with mode: 0644]
hphp/hack/src/parser/syntax_generated.rs [new file with mode: 0644]
hphp/hack/src/parser/syntax_kind.rs [new file with mode: 0644]