Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Replace AST with CST #2213

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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