Module Parsexp__Automaton_stack.For_cst

type t =
| Empty

at top-level

| T_or_comment of Parsexp.Cst.t_or_comment * t

after the given sexp or comment

| Open of Parsexp.Positions.pos * t

after the opening paren

| In_sexp_comment of {
hash_semi_pos : Parsexp.Positions.pos;
rev_comments : Parsexp.Cst.comment list;
stack : t;
}

In_sexp_comment only indicates if the next s-expression is to be commented out, but if we are nested below parens below an sexp comment, the stack would look like Open (.., In_sexp_comment ..).

val empty : t
val get_many : t -> Parsexp.Cst.t_or_comment list

Raises if t contains a partial sexp.