Stack.For_cst
type t =
| Empty
at top-level
*)| T_or_comment of Cst.t_or_comment * t
after the given sexp or comment
*)| Open of Positions.pos * t
after the opening paren
*)| In_sexp_comment of {
hash_semi_pos : Positions.pos;
rev_comments : 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 -> Cst.t_or_comment list
Raises if t
contains a partial sexp.