Skip to content

Commit

Permalink
Replace AST with CST
Browse files Browse the repository at this point in the history
  • Loading branch information
gpetiot committed Feb 7, 2023
1 parent 650bae5 commit 742fad3
Show file tree
Hide file tree
Showing 3 changed files with 584 additions and 544 deletions.
20 changes: 9 additions & 11 deletions vendor/parser-extended/asttypes.mli
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,6 @@
*)

type constant =
Const_int of int
| Const_char of char
| Const_string of string * Location.t * string option
| Const_float of string
| Const_int32 of int32
| Const_int64 of int64
| Const_nativeint of nativeint

type rec_flag = Nonrecursive | Recursive

type direction_flag = Upto | Downto
Expand All @@ -54,10 +45,15 @@ type obj_closed_flag =

type label = string

type label_info = {
name: string loc;
extra_info: [ `Single_token | `Previous_token of Location.t ];
}

type arg_label =
Nolabel
| Labelled of string (** [label:T -> ...] *)
| Optional of string (** [?label:T -> ...] *)
| Labelled of label_info (* label:T -> ... *)
| Optional of label_info (* ?label:T -> ... *)

type 'a loc = 'a Location.loc = {
txt : 'a;
Expand All @@ -70,3 +66,5 @@ type variance_and_injectivity = string loc list

(* For Pexp_indexop_access *)
type paren_kind = Paren | Brace | Bracket

type and_or_with = And | With
Loading

0 comments on commit 742fad3

Please sign in to comment.