Port DeclModeSmartConstructors
Summary:
Port `DeclModeSmartConstructors`, one of the specializations
of `SyntaxSmartConstructors`. The state (i.e., vector of booleans)
is reversed compared to OCaml implementation so that push/pop run in
amortized O(1) (note: no need for &Vec/&[], as moving takes O(1)) time.
The implementation is specialized via type params `Token` & `Value`,
which is equiavlent to `Syntax.t` in Ocaml via `Syntax<Token, Value>`.
Reviewed By: dabek
Differential Revision:
D15112859
fbshipit-source-id:
9e5f1d0eafa0a402957b5846f3f15d47b631f68e