diff options
| author | Thomas Bauereiss | 2017-10-25 15:27:29 +0100 |
|---|---|---|
| committer | Thomas Bauereiss | 2017-10-25 16:08:28 +0100 |
| commit | 5fc7d18f2ab65100b2a0894daae874145b5d6813 (patch) | |
| tree | e83b41db514e54c3e055da507a0e95d92f7e0fcc /src/ast_util.ml | |
| parent | 4cbcf71c54628b13e6ced99b4c9ce1edbd1bffe1 (diff) | |
Allow mutually recursive functions
Diffstat (limited to 'src/ast_util.ml')
| -rw-r--r-- | src/ast_util.ml | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/ast_util.ml b/src/ast_util.ml index d839b5a4..b0f4c052 100644 --- a/src/ast_util.ml +++ b/src/ast_util.ml @@ -306,6 +306,22 @@ let id_loc = function let kid_loc = function | Kid_aux (_, l) -> l +let def_loc = function + | DEF_kind (KD_aux (_, (l, _))) + | DEF_type (TD_aux (_, (l, _))) + | DEF_fundef (FD_aux (_, (l, _))) + | DEF_val (LB_aux (_, (l, _))) + | DEF_spec (VS_aux (_, (l, _))) + | DEF_default (DT_aux (_, l)) + | DEF_scattered (SD_aux (_, (l, _))) + | DEF_reg_dec (DEC_aux (_, (l, _))) -> + l + | DEF_internal_mutrec _ + | DEF_comm _ + | DEF_overload _ + | DEF_fixity _ -> + Parse_ast.Unknown + let string_of_id = function | Id_aux (Id v, _) -> v | Id_aux (DeIid v, _) -> "(deinfix " ^ v ^ ")" |
