+120
-99
bin/yamlcat.ml
+120
-99
bin/yamlcat.ml
············
+1
dune
+1
dune
+6
-12
lib/char_class.ml
+6
-12
lib/char_class.ml
······
+5
-19
lib/chomping.ml
+5
-19
lib/chomping.ml
···
+16
-20
lib/document.ml
+16
-20
lib/document.ml
·········
+63
-107
lib/eio/yamlrw_eio.ml
+63
-107
lib/eio/yamlrw_eio.ml
························
+66
-52
lib/eio/yamlrw_eio.mli
+66
-52
lib/eio/yamlrw_eio.mli
·······································
+209
-211
lib/emitter.ml
+209
-211
lib/emitter.ml
····································-push_state t In_flow_mapping_value; (* After ] we'll be in value position but sequence handles it *)························
+12
-20
lib/encoding.ml
+12
-20
lib/encoding.ml
·········
+135
-105
lib/error.ml
+135
-105
lib/error.ml
·········-{{:https://yaml.org/spec/1.2.2/#3222-anchors-and-aliases}Section 3.2.2.2 (Anchors and Aliases)}. *)-{{:https://yaml.org/spec/1.2.2/#3222-anchors-and-aliases}Section 3.2.2.2 (Anchors and Aliases)}. *)-{{:https://yaml.org/spec/1.2.2/#683-reserved-directives}Section 6.8.3 (Reserved Directives)}. *)-{{:https://yaml.org/spec/1.2.2/#82-block-collection-styles}Section 8.2 (Block Collection Styles)}. *)(* Parser errors - see {{:https://yaml.org/spec/1.2.2/#3-processing-yaml-information}Section 3 (Processing)} *)-{{:https://yaml.org/spec/1.2.2/#3222-anchors-and-aliases}Section 3.2.2.2 (Anchors and Aliases)}. *)-{{:https://yaml.org/spec/1.2.2/#3222-anchors-and-aliases}Section 3.2.2.2 (Anchors and Aliases)}. *)-{{:https://yaml.org/spec/1.2.2/#3222-anchors-and-aliases}Section 3.2.2.2 (Anchors and Aliases)}. *)(* Loader errors - see {{:https://yaml.org/spec/1.2.2/#31-processes}Section 3.1 (Processes)} *)-See {{:https://yaml.org/spec/1.2.2/#3222-anchors-and-aliases}Section 3.2.2.2 (Anchors and Aliases)}. *)-(** Alias expansion exceeded maximum nesting depth (protection against deeply nested aliases).··················
+10
-18
lib/event.ml
+10
-18
lib/event.ml
······
+50
-71
lib/input.ml
+50
-71
lib/input.ml
····································
+7
-18
lib/layout_style.ml
+7
-18
lib/layout_style.ml
···
+138
-162
lib/loader.ml
+138
-162
lib/loader.ml
·····················
+38
-41
lib/mapping.ml
+38
-41
lib/mapping.ml
·········
+266
-305
lib/parser.ml
+266
-305
lib/parser.ml
··············································································-Error.raise_span tok.span (Invalid_directive "directives require explicit document end '...' before them");···
+11
-28
lib/position.ml
+11
-28
lib/position.ml
···
+31
-27
lib/quoting.ml
+31
-27
lib/quoting.ml
······
+22
-24
lib/scalar.ml
+22
-24
lib/scalar.ml
·········
+8
-11
lib/scalar_style.ml
+8
-11
lib/scalar_style.ml
······
+536
-399
lib/scanner.ml
+536
-399
lib/scanner.ml
······-mutable document_has_content : bool; (** True if we've emitted content tokens in current document *)-mutable adjacent_value_allowed_at : Position.t option; (** Position where adjacent : is allowed *)······················································-if not (Input.is_eof t.input) && not (Input.next_is_break t.input) && col <= indent && indent >= 0 then-Error.raise_at (Input.mark t.input) (Invalid_quoted_scalar_indentation "invalid indentation in quoted scalar");···-if not (Input.is_eof t.input) && not (Input.next_is_break t.input) && col <= indent && indent >= 0 then-Error.raise_at (Input.mark t.input) (Invalid_quoted_scalar_indentation "invalid indentation in quoted scalar")·····················-Error.raise_at (Input.mark t.input) (Invalid_quoted_scalar_indentation "invalid indentation in quoted scalar");-Error.raise_at (Input.mark t.input) (Invalid_quoted_scalar_indentation "invalid indentation in quoted scalar");···························-let max_empty_line_indent = ref 0 in (* Track max indent of empty lines before first content *)························Note: we check Input.next_is_blank BEFORE reading content to see if content starts with whitespace. *)so we should NOT add any back. On subsequent lines, we add only the spaces beyond content_indent. *)············-Error.raise_at (Input.mark t.input) (Invalid_directive "expected comment or line break after version");···············-| _ -> Error.raise_at start (Invalid_directive "content not allowed after document end marker on same line"))···-(Unexpected_token "directives must be separated from document content by document end marker (...)");··················(* : followed by whitespace in block, or whitespace/flow indicator in flow, or adjacent value *)············(* In block context without simple key, allow simple keys for compact mappings like ": moon: white"(* Check for tabs after : : patterns like :\t- or :\tkey: are invalid in block context (Y79Y/09)(* In block context, tabs-only after : followed by indicator or alphanumeric are not allowed *)··················
+20
-28
lib/sequence.ml
+20
-28
lib/sequence.ml
·········
+166
-139
lib/serialize.ml
+166
-139
lib/serialize.ml
············-let documents_to_buffer ?(config = Emitter.default_config) ?(resolve_aliases = true) ?buffer documents =···-let documents_to_string ?(config = Emitter.default_config) ?(resolve_aliases = true) documents =······-let documents_to_writer ?(config = Emitter.default_config) ?(resolve_aliases = true) ?(eod = true) writer documents =···
+10
-16
lib/span.ml
+10
-16
lib/span.ml
···
+12
-14
lib/tag.ml
+12
-14
lib/tag.ml
······
+30
-51
lib/token.ml
+30
-51
lib/token.ml
···
+38
-66
lib/unix/yamlrw_unix.ml
+38
-66
lib/unix/yamlrw_unix.ml
·········
+4
-12
lib/unix/yamlrw_unix.mli
+4
-12
lib/unix/yamlrw_unix.mli
······
+16
-20
lib/value.ml
+16
-20
lib/value.ml
···············
+115
-102
lib/yaml.ml
+115
-102
lib/yaml.ml
·········-@raise Error.Yamlrw_error with {!type:Error.kind} [Alias_expansion_node_limit] if max_nodes is exceeded-@raise Error.Yamlrw_error with {!type:Error.kind} [Alias_expansion_depth_limit] if max_depth is exceeded-let resolve_aliases ?(max_nodes = default_max_alias_nodes) ?(max_depth = default_max_alias_depth) (root : t) : t =··················-@raise Error.Yamlrw_error with {!type:Error.kind} [Unresolved_alias] if resolve_aliases_first is false and an alias is encountered
+183
-253
lib/yamlrw.ml
+183
-253
lib/yamlrw.ml
······-version : (int * int) option; (** Optional YAML version directive (e.g., (1, 2) for YAML 1.2) *)······-Buffer.contents (documents_to_buffer ~encoding ~scalar_style ~layout_style ~resolve_aliases documents)-(Yaml.to_value ~resolve_aliases_first:resolve_aliases ~max_nodes ~max_depth (yaml :> Yaml.t) :> value)·································
+96
-90
lib/yamlrw.mli
+96
-90
lib/yamlrw.mli
·········-version : (int * int) option; (** Optional YAML version directive (e.g., (1, 2) for YAML 1.2) *)··································································-val scalar : emitter -> ?anchor:string -> ?tag:string -> ?style:Scalar_style.t -> string -> unit···-val sequence_start : emitter -> ?anchor:string -> ?tag:string -> ?style:Layout_style.t -> unit -> unit···-val mapping_start : emitter -> ?anchor:string -> ?tag:string -> ?style:Layout_style.t -> unit -> unit···
+17
-8
tests/dune
+17
-8
tests/dune
···
+209
-144
tests/run_all_tests.ml
+209
-144
tests/run_all_tests.ml
··················-let fail_count = List.length (List.filter (fun r -> match r.status with `Fail _ -> true | _ -> false) results) in-let json_fail_count = List.length (List.filter (fun r -> match r.json_status with `Fail _ -> true | _ -> false) results) in···-let json_badge = Printf.sprintf {|<span class="badge %s" style="margin-left: 4px;">JSON: %s</span>|}···-Printf.fprintf oc {| <div class="test" data-status="%s" data-json-status="%s" data-id="%s" data-name="%s">······-Arg.parse args (fun _ -> ()) "Usage: run_all_tests [--html <file>] [--show-skipped] [--test-suite-path <path>]";-let fail_count = List.length (List.filter (fun r -> match r.status with `Fail _ -> true | _ -> false) results) in-let json_fail_count = List.length (List.filter (fun r -> match r.json_status with `Fail _ -> true | _ -> false) results) in···
+224
-162
tests/run_all_tests_eio.ml
+224
-162
tests/run_all_tests_eio.ml
············-let fail_count = List.length (List.filter (fun r -> match r.status with `Fail _ -> true | _ -> false) results) in-let json_fail_count = List.length (List.filter (fun r -> match r.json_status with `Fail _ -> true | _ -> false) results) in···-let json_badge = Printf.sprintf {|<span class="badge %s" style="margin-left: 4px;">JSON: %s</span>|}···-Printf.bprintf buf {| <div class="test" data-status="%s" data-json-status="%s" data-id="%s" data-name="%s">······-Arg.parse args (fun _ -> ()) "Usage: run_all_tests_eio [--html <file>] [--show-skipped] [--sequential] [--test-suite-path <path>]";-Printf.printf "Loaded %d tests in %.3fs\n%!" (List.length all_tests) (load_time -. start_time);-let fail_count = List.length (List.filter (fun r -> match r.status with `Fail _ -> true | _ -> false) results) in-let json_fail_count = List.length (List.filter (fun r -> match r.json_status with `Fail _ -> true | _ -> false) results) in···
+6
-1
tests/test_suite_lib/dune
+6
-1
tests/test_suite_lib/dune
···
+29
-27
tests/test_suite_lib/json_compare.ml
+29
-27
tests/test_suite_lib/json_compare.ml
···············
+37
-27
tests/test_suite_lib/json_format.ml
+37
-27
tests/test_suite_lib/json_format.ml
···-else if f = Float.infinity || f = Float.neg_infinity then "null" (* JSON doesn't support Inf *)
+5
-10
tests/test_suite_lib/test_suite_loader.ml
+5
-10
tests/test_suite_lib/test_suite_loader.ml
······
+15
-15
tests/test_suite_lib/test_suite_loader_eio.ml
+15
-15
tests/test_suite_lib/test_suite_loader_eio.ml
············
+40
-31
tests/test_suite_lib/test_suite_loader_generic.ml
+40
-31
tests/test_suite_lib/test_suite_loader_generic.ml
··················
+27
-28
tests/test_suite_lib/tree_format.ml
+27
-28
tests/test_suite_lib/tree_format.ml
·········
+147
-112
tests/test_yamlrw.ml
+147
-112
tests/test_yamlrw.ml
············-check_value "plain" (`String "hello") (of_string "hello world" |> function `String s -> `String (String.sub s 0 5) | v -> v);···-Alcotest.failf "expected 1 pair but got %d pairs (trailing comma should not create empty entry)"···-Alcotest.(check bool) "contains name" true (starts_with "name" trimmed || starts_with "\"name\"" trimmed)···············-| _ -> Alcotest.fail ("expected Alias_expansion_depth_limit error, got: " ^ Error.kind_to_string e.Error.kind))·········