Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
type visitor_in = {
kexpr : ((AST_generic.expr -> AST_generic.expr) * visitor_out) ->
AST_generic.expr ->
AST_generic.expr;
kstmt : ((AST_generic.stmt -> AST_generic.stmt) * visitor_out) ->
AST_generic.stmt ->
AST_generic.stmt;
kinfo : ((AST_generic.tok -> AST_generic.tok) * visitor_out) ->
AST_generic.tok ->
AST_generic.tok;
kidinfo : ((AST_generic.id_info -> AST_generic.id_info) * visitor_out) ->
AST_generic.id_info ->
AST_generic.id_info;
klit : ((AST_generic.literal -> AST_generic.literal) * visitor_out) ->
AST_generic.literal ->
AST_generic.literal;
kargs : ((AST_generic.argument list -> AST_generic.argument list) * visitor_out) ->
AST_generic.argument list ->
AST_generic.argument list;
kname : ((AST_generic.name -> AST_generic.name) * visitor_out) ->
AST_generic.name ->
AST_generic.name;
}
and visitor_out = {
vitem : AST_generic.item -> AST_generic.item;
vprogram : AST_generic.program -> AST_generic.program;
vexpr : AST_generic.expr -> AST_generic.expr;
vany : AST_generic.any -> AST_generic.any;
}
val default_visitor : visitor_in
val mk_visitor : visitor_in -> visitor_out
val mk_fix_token_locations :
(Parse_info.token_location -> Parse_info.token_location) ->
visitor_out
Make a visitor that fixes token locations, e.g. when we want to interpret * a sub-AST as an independent program. This is used to implement * metavariable-pattern in Match_rules.satisfies_metavar_pattern_condition
.