diff --git a/lib/pinc_interpreter/Tag.ml b/lib/pinc_interpreter/Tag.ml index 068411c..915f5c3 100644 --- a/lib/pinc_interpreter/Tag.ml +++ b/lib/pinc_interpreter/Tag.ml @@ -752,7 +752,7 @@ module Tag_Array = struct end let eval ~eval_expression ~state t = - let { key; required; tag; attributes; children; transformer } = t.tag_desc in + let { key; required; kind; attributes; children; transformer } = t.tag_desc in let path = match (key, state.tag_array_index) with @@ -765,7 +765,7 @@ let eval ~eval_expression ~state t = in let state = - match tag with + match kind with | Tag_SetContext -> key |> Tag_Context.eval_set ~state ~required ~attributes t | Tag_GetContext -> key |> Tag_Context.eval_get ~state ~required ~attributes t | Tag_CreatePortal -> key |> Tag_Portal.eval_create ~state ~required ~attributes t diff --git a/lib/pinc_parser/Transformer.ml b/lib/pinc_parser/Transformer.ml index 631b412..2db402e 100644 --- a/lib/pinc_parser/Transformer.ml +++ b/lib/pinc_parser/Transformer.ml @@ -152,7 +152,7 @@ and transform_tag env (tag : Parsetree.tag) = Option.fold_map ~init:env ~f:transform_expression desc.transformer in - let public_tag_typ, tag, initial_value = + let public_tag_typ, kind, initial_value = match desc.tag with | P_Tag_String -> let initialValue = @@ -286,7 +286,7 @@ and transform_tag env (tag : Parsetree.tag) = | Some (`Optional, _) -> false in - let tag_desc = { key; required; tag; attributes; children; transformer } in + let tag_desc = { key; required; kind; attributes; children; transformer } in let env = { env with diff --git a/lib/pinc_types/Ast.ml b/lib/pinc_types/Ast.ml index f5f9c89..64ba804 100644 --- a/lib/pinc_types/Ast.ml +++ b/lib/pinc_types/Ast.ml @@ -44,7 +44,7 @@ and tag_kind = | Tag_Custom of string and tag_desc = { - tag : tag_kind; + kind : tag_kind; key : string; required : bool; attributes : expression StringMap.t;