Simon Génier pushed to branch simon--sexp-node-location at Stefan / Typer
WARNING: The push did not contain any new commits, but force pushed to delete the commits and changes below.
Deleted commits: da30313c by Simon Génier at 2023-02-19T16:10:45-05:00 Track locations during parsing instead of recomputing them.
- - - - -
1 changed file:
- src/elexp.ml
Changes:
===================================== src/elexp.ml ===================================== @@ -81,17 +81,18 @@ type elexp = * but they can appear in the code. *) | Type of L.lexp
-let rec elexp_location : elexp -> Source.Location.t = function - | Imm value -> sexp_location value - | Var ((sinfo, _), _) -> sexp_location sinfo - | Proj (l, _, _) -> l - | Builtin ((l, _)) -> l - | Let (l, _, _) -> l - | Lambda ((l, _), _) -> sexp_location l - | Call (f, _) -> elexp_location f - | Cons (_, (l, _)) -> l - | Case (l, _, _, _) -> l - | Type e -> L.lexp_location e +let rec elexp_location e = + match e with + | Imm s -> sexp_location s + | Var ((l,_), _) -> sexp_location l + | Proj (l,_,_) -> l + | Builtin ((l, _)) -> l + | Let (l,_,_) -> l + | Lambda ((l,_),_) -> sexp_location l + | Call (f,_) -> elexp_location f + | Cons (_, (l, _)) -> l + | Case (l,_,_,_) -> l + | Type e -> L.lexp_location e
let elexp_name e =
View it on GitLab: https://gitlab.com/monnier/typer/-/commit/da30313cf67a9e6db61787ab800a588024...
Afficher les réponses par date