Apply Ocamlvalue derive to oxidized aast related types
[hiphop-php.git] / hphp / hack / src / oxidized / gen / ast_defs.rs
blobb63040feb286ee5b19e4c2caf36c1b82bcabb125
1 // Copyright (c) Facebook, Inc. and its affiliates.
2 //
3 // This source code is licensed under the MIT license found in the
4 // LICENSE file in the "hack" directory of this source tree.
5 //
6 // @generated SignedSource<<2c751a98cfac3db81041d201398978c1>>
7 //
8 // To regenerate this file, run:
9 //   hphp/hack/src/oxidized/regen.sh
11 use ocamlrep_derive::IntoOcamlRep;
12 use ocamlvalue_macro::Ocamlvalue;
14 use crate::pos;
16 pub use crate::shape_map;
18 pub use pos::Pos;
20 #[derive(Clone, Debug, IntoOcamlRep, Ocamlvalue)]
21 pub struct Id(pub Pos, pub String);
23 pub type Pstring = (Pos, String);
25 #[derive(Clone, Debug, IntoOcamlRep, Ocamlvalue)]
26 pub enum ShapeFieldName {
27     SFlitInt(Pstring),
28     SFlitStr(Pstring),
29     SFclassConst(Id, Pstring),
32 #[derive(Clone, Debug, IntoOcamlRep, Ocamlvalue)]
33 pub enum Variance {
34     Covariant,
35     Contravariant,
36     Invariant,
39 #[derive(Clone, Debug, IntoOcamlRep, Ocamlvalue)]
40 pub enum ConstraintKind {
41     ConstraintAs,
42     ConstraintEq,
43     ConstraintSuper,
44     ConstraintPuFrom,
47 pub type Reified = bool;
49 #[derive(Clone, Debug, IntoOcamlRep, Ocamlvalue)]
50 pub enum ClassKind {
51     Cabstract,
52     Cnormal,
53     Cinterface,
54     Ctrait,
55     Cenum,
56     Crecord,
59 #[derive(Clone, Debug, IntoOcamlRep, Ocamlvalue)]
60 pub enum ParamKind {
61     Pinout,
64 #[derive(Clone, Debug, IntoOcamlRep, Ocamlvalue)]
65 pub enum OgNullFlavor {
66     OGNullthrows,
67     OGNullsafe,
70 #[derive(Clone, Debug, IntoOcamlRep, Ocamlvalue)]
71 pub enum FunKind {
72     FSync,
73     FAsync,
74     FGenerator,
75     FAsyncGenerator,
76     FCoroutine,
79 #[derive(Clone, Debug, IntoOcamlRep, Ocamlvalue)]
80 pub enum Bop {
81     Plus,
82     Minus,
83     Star,
84     Slash,
85     Eqeq,
86     Eqeqeq,
87     Starstar,
88     Diff,
89     Diff2,
90     Ampamp,
91     Barbar,
92     LogXor,
93     Lt,
94     Lte,
95     Gt,
96     Gte,
97     Dot,
98     Amp,
99     Bar,
100     Ltlt,
101     Gtgt,
102     Percent,
103     Xor,
104     Cmp,
105     QuestionQuestion,
106     Eq(Option<Box<Bop>>),
109 #[derive(Clone, Debug, IntoOcamlRep, Ocamlvalue)]
110 pub enum Uop {
111     Utild,
112     Unot,
113     Uplus,
114     Uminus,
115     Uincr,
116     Udecr,
117     Upincr,
118     Updecr,
119     Uref,
120     Usilence,
123 #[derive(Clone, Debug, IntoOcamlRep, Ocamlvalue)]
124 pub enum FunDeclKind {
125     FDeclAsync,
126     FDeclSync,
127     FDeclCoroutine,