Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
2c040f1
WIP EdgeLabel cut: rename Named->Authored; v2.std.node root arms
Sep 30, 2026
84056c4
WIP cut: core markers, path labels, dag surface readers
Sep 30, 2026
4ef1635
WIP cut: dag surface production labels, ReferenceSite position labels…
Sep 30, 2026
b001462
WIP cut: exhaustive arms round 1
Sep 30, 2026
8b2fb11
WIP cut: exhaustive arms round 2, RFM climb + frontier, reader controls
Sep 30, 2026
dfadbf0
WIP: fix stray imports
Sep 30, 2026
388c847
WIP cut: round-3 arms, SCM codec for structural labels, seed reflecti…
Sep 30, 2026
8682cb7
WIP: list_map
Sep 30, 2026
cdee2c0
WIP: re-derived hash vectors
Sep 30, 2026
71ba4d8
WIP: arms the typechecker missed (generic scrutinee)
Sep 30, 2026
0b75ecf
Merge origin/main into the EdgeLabel cut
Sep 30, 2026
f4689d7
EdgeLabel cut: controls as evidence on the climb row
Sep 30, 2026
1b6c50a
fact_density: import ConstructionJustification directly (floor Unimpo…
Sep 30, 2026
36157a0
Direct imports for two names the touched files reached only through t…
Sep 30, 2026
cc34a2b
Floor bare-provider roster: retire two pairs my imports fixed; direct…
Sep 30, 2026
c2884b9
Merge origin/main into the EdgeLabel cut
Sep 30, 2026
43a2944
Floor bare-provider roster: retire pairs the added imports fixed
Sep 30, 2026
6b56a3f
Record patterns over Edge cover StructuralLabel (emitted Rust E0004 i…
Sep 30, 2026
e481615
Merge remote-tracking branch 'origin/main' into session/quiet-koi-814…
Sep 30, 2026
e57b4ae
Marker tests as edge_is_core predicates (emitted nested-constant patt…
Sep 30, 2026
6765449
Merge origin/main into the EdgeLabel cut
Sep 30, 2026
b04efa1
module_member_emission_test: where clause edge as the dag surface pro…
Sep 30, 2026
5798d5f
Guard for the emitter nested-constant defect: interpreted-vs-emitted …
Sep 30, 2026
d3958e3
RFM: emitter trigger owner is deep-ferret-305
Sep 30, 2026
e3c1aa8
Merge origin/main; construct tag (#12714) becomes CoreEdgeLabel Const…
Sep 30, 2026
d898fae
Record the ConstructTag conversion on the climb row and the plan
Sep 30, 2026
5b22103
Merge origin/main into the EdgeLabel cut; cite ConstructTagEdge
Sep 30, 2026
5ddc945
wave1 helper: typed optional constructors in the edge_is_core branch
Sep 30, 2026
ea6bcb3
Merge origin/main into the EdgeLabel cut: match_arm_pattern_edge and …
Sep 30, 2026
589157d
Merge origin/main; the construct tag and its elided marker are CoreEd…
Sep 30, 2026
ee2b67d
Merge origin/main (#12828 carries the flipped emitter witness and RFM…
Sep 30, 2026
0e46191
Merge origin/main; ^loop_realized_declaration_edge (#12550) becomes C…
Sep 30, 2026
115d816
fold_encoding_test: StructuralLabel arm
Sep 30, 2026
5c28777
Merge origin/main; dag.dag complement/binop arrow domains keep Author…
Oct 1, 2026
a38f0ec
Map-literal markers become CoreEdgeLabel arms (MapLiteralEntryEdge, M…
Oct 1, 2026
00ee9aa
Merge origin/main; #12766's parameter-reference marker becomes CoreEd…
Oct 1, 2026
789f0bf
Merge origin/main; #12847's let-annotation position edge and its clai…
Oct 1, 2026
92e5ab5
Merge origin/main; #12863's Arrow contract edges become CoreEdgeLabel…
Oct 1, 2026
9127be8
#12879's list-literal claim reads a named actual as Authored (it impo…
Oct 1, 2026
2f2afd4
Merge origin/main; take #12899's one binder reader (declared_field_fr…
Oct 1, 2026
8b49986
Merge origin/main (import-list conflicts only: #12898 resource declar…
Oct 1, 2026
a8ac3e0
Merge origin/main (#12890 landed); take main's deletion of emit_inges…
Oct 1, 2026
d7a2089
Merge origin/main (#12909): its new v2.std.node arrow_signature_order…
Oct 1, 2026
a517d8f
Merge origin/main (#12904): the one binder builder (binder_edge, bind…
Oct 1, 2026
b9f1569
Merge origin/main; #12770/#12862 sites read Authored; arrow_domain_bi…
Oct 1, 2026
5e4ee25
Merge origin/main (clean; no new Named sites or text-matched markers …
Oct 1, 2026
716dbc3
Merge origin/main (#12936 landed; #12923 binder node): the binder nod…
Oct 1, 2026
64b1ad1
sort_labeled partitions by the label's arm (labeled_sort_classes); la…
Oct 1, 2026
1440a09
Merge origin/main (#12660 enumerates closed-coproduct arms): corpus_c…
Oct 1, 2026
f182e73
Merge origin/main (#12911 requires clause, #12605): the resource-requ…
Oct 1, 2026
e168bc5
module_graph: drop the gunbc.rust_item_scan ends_with import that #12…
Oct 2, 2026
07b992b
Merge origin/main (#12948 defaults on binders, #12790 close_lowered_i…
Oct 2, 2026
255cf54
node_minimal_representation_test: OccurrencePending arms (#12790 adde…
Oct 2, 2026
075be31
Merge origin/main (#12960 requires none/opaque, #12968, #12939, #1296…
Oct 2, 2026
064f99c
Merge origin/main (#12760 kernel host-text String, #12932, #12914): i…
Oct 2, 2026
b629c7d
Merge origin/main (DIRTY; #12969 = #12947 lexical refs by occurrence …
Oct 2, 2026
b74d1c0
translate_underived_refusal claim builds its effect-claims edge as co…
Oct 2, 2026
4f631ca
No wildcard arm over a closed coproduct in this PR's four new functio…
Oct 2, 2026
4c7eaa9
Merge origin/main (#12980 NFR census roster landed; #12993 #12985 #12…
Oct 2, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ data authored_lexeme_read_as_a_grammar_marker: RecurringFailureMode = RecurringF
"CENSUS (this change): 222 non-test references to the 65 marker symbols (every `emitted:` identity in `v2.extdeps.languages.dag`, plus the four sugar keys). 185 read the marker through its emission (`parse_production_emitted_identity_optional`) or are declarations; 19 are prose; 10 are BARE; 8 are UNCLEAR. The four ^dag_c3_surface_sugar_* rules had NO producer anywhere (src/v2, dag, seed): only test fixtures built those atoms, so the rules, the SurfaceAtomKey arm and their two fixture claims were deleted rather than re-keyed.",
"OPEN, EDGE-LABEL CHANNEL (not fixed here; its fix is a Node-model change the owning lane routes): lowering and the graft put authored parameter, field and declaration names into `Named` edge labels, and edge labels carry no record of whether the grammar or the author named them. Four helpers match marker labels there: `v2.extdeps.languages.dag` `dag_surface_module_header_metadata_edge`, the Absent-emission fallback arm of `dag_node_is_module_root_conj`, `v2.compiler.body_lowering_fold` `body_lower_edge_names_where_clause`, and `v2.lens.module_graph` `site_is_import_syntax_mention`. Specimen, read and not run: `fn f(dag_surface_module_header: Int)` gives the parameter Conj a member edge named like the header, so `dag_node_is_module_root_conj` answers true for it in resolve.",
"RUNG FOUND AT: below the floor (a silent rewrite of an identifier) on the atom channel. RUNG NOW: structurally guaranteed on the atom channel -- no marker reader keys on a bare atom, so authored text cannot reach one. The edge channel stays below the floor. CEILING: structurally impossible -- a grammar marker is a construct authored text has no constructor for. NEXT-RUNG TRIGGER, NAMING THE CAPABILITY: a `Named` edge label carries whether the grammar or the author named it, and every marker-label reader reads that provenance, so no authored name can inhabit a marker label.",
"EDGE-LABEL CHANNEL, CLIMBED (quiet-koi-814, the EdgeLabel cut). The four helpers named above match the StructuralLabel arm, so an authored name spelled like a marker label is an Authored value and reaches none of them; the climb, its rung and the frontier that still compares grammar labels by text inside the Authored arm are recorded once, on `gunbc.recurring_failure_mode` `behavior_named_edge_label_validated_not_constructed`, not here.",
],

evidence: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,17 @@ data behavior_named_edge_label_validated_not_constructed: RecurringFailureMode =
"CEILING: structurally impossible -- which label a behavior's Named edge may carry is decidable and fully modeled, so the invalid state need not have a constructor. NEXT-RUNG TRIGGER, NAMING THE CAPABILITY: edge labels on behavior nodes become a closed coproduct owned by `v2.std.node`, so a Transform's or Bind's Named edge can only be constructed as the marker that behavior admits and a foreign label has no constructor; `type_binder_labels_conform`'s label arm for behaviors then dissolves, its discriminating red kept as the evidence. It must be ONE authority with the edge-discipline coproduct gentle-koi-724's lane is building, not a second one beside it.",
"THE WALL IS SPLIT, NOT WIDENED (MQ-1 PR-B, ruled by gentle-koi-724 and neat-boar-16, 2026-09-26; loyal-crab-333's wall). Named arguments now ride an application as Named edges labelled by the callee's parameter names (v2.compiler.body_lowering_fold body_lower_call_arg_edge), so a Transform is one of two forms: a cast, whose one Named edge is the <cast-target> marker, or an application, whose Named edges are named actuals. v2.std.node states a Transform's shape as positional_prefix_then_labeled_conform (positional first, then distinct Named edges -- an application's positional order carries meaning), while a Bind keeps PositionalPlusOneNamedEdges (one marker, placed freely) and admits only the <type-annotation> label (v2.std.type_binder bind_named_labels_conform), and v2.std.type_binder transform_named_labels_conform refuses a Transform that MIXES the marker with any other Named edge, located at that Transform (v2.std.type_binder type_binder_first_mislabelled, read by v2.compiler.resolve's gate). A named label that names no parameter of the callee is a binding fact, refused by the one binding authority (v2.std.arrow_signature application_binding_plan, application_argument_label_unknown) before any program is Accepted. So the rung stays structurally guaranteed, reached by two decidable halves instead of one label list. Discriminating reds: v2.test.claim.body_cast_node bcn_a_foreign_label_on_a_transform_refuses (restated as the mixing case) and bcn_an_unknown_named_label_refuses_at_binding; the cast controls in the same module are unchanged.",
"WHAT THE TRIGGER MUST BE SUFFICIENT FOR, stated per DESIGN section 4b(3) (review 72087, MQ-1 PR-B). With named arguments, a Transform is one of two forms: a CAST whose one Named edge is the <cast-target> marker, or an APPLICATION whose Named edges are named actuals labelled by parameter names. v2.std.type_binder transform_named_labels_conform refuses a Transform that MIXES them -- validation over a state the model can still write, because the label is an open Named { name: Symbol }. A Cast behavior is not available (DESIGN section 4 fixes the six behaviors), so the construction route is this row's own trigger: behavior-node edge labels become a closed coproduct owned by v2.std.node. It is met only when that coproduct gives the cast marker and an application's named actual DISTINCT label constructors, so a marker beside an actual has no constructor; transform_named_labels_conform's mix arm then dissolves, and its discriminating red v2.test.claim.body_cast_node bcn_a_foreign_label_on_a_transform_refuses stays enrolled as the evidence (DESIGN section 4b(4)). Owner: the v2 type-binders lane under neat-boar-16, coordinated with the named-arguments edge discipline (v2.std.node positional_prefix_then_labeled_conform)."
"CLIMB, EDGE LABELS (quiet-koi-814; model gunbc#12473, ruled by neat-boar-16, ruling A; scope ruled by gentle-koi-724). `v2.std.node` `EdgeLabel` is now `Authored { name } | StructuralLabel { label: StructuralEdgeLabel } | Positional`, with `StructuralEdgeLabel = CoreMarker { marker: CoreEdgeLabel } | ProductionEdge { language, edge }`; the old `Named { name: Symbol }` arm was deleted first and every site renamed or converted in one change (DESIGN section 3, root-first). CONVERTED, EVERY MINTER AND READER: the core markers (arrow body, arrow signature order, loop bound, carrier and domain, match arm pattern and body, the `v2.std.type_binder` cast target, type annotation, type params, type body and type alias, the declaration reference, the field projection base and field, and the construct tag from gunbc#12714) and the dag surface productions the text-matching readers needed (module header and its qualified name, where-refinement clause, import decl, import block, import decl block, import decl qualified name), plus `v2.std.node` `Path` steps and `v2.compiler.resolution_provenance` `ReferenceSite` position, which now carry whole labels. The four text-matching readers (`v2.extdeps.languages.dag` `dag_surface_module_header_metadata_edge` and the Absent-emission arm of `dag_node_is_module_root_conj`, `v2.compiler.body_lowering_fold` `body_lower_edge_names_where_clause`, `v2.lens.module_graph` `site_is_import_syntax_mention`) match the arm, so no Authored label reaches them whatever it spells. The marker lexemes (`<cast-target>` and siblings) are gone: a marker is an arm, not an unauthorable spelling.",
"RUNG AFTER THE CLIMB, PER PATH. The confusion this row names -- a behavior's marker label read from an authored spelling -- is structurally impossible on every converted reader: an Authored value is never equal to a StructuralLabel value. What stays at rung 3 is the SHAPE half of the behavior rule: a Bind or a Transform can still be handed an Authored label where only its marker belongs (a Bind's only admitted label is its type annotation; a Transform's authored labels are its named actuals), so `type_binder_labels_conform` keeps refusing a foreign Authored label on a Bind and a cast marker mixed with named actuals. Its next-rung trigger is unchanged in kind: per-behavior label coproducts, so a Bind's named edge has no Authored constructor.",
"DECLARED FRONTIER, AUTHORED ARM CARRYING GRAMMAR-EMITTED LABELS (ruled by gentle-koi-724 on the cut). Labels a grammar or a language model emits, but that no converted reader matches, still ride the Authored arm and their readers still compare text inside it. POPULATION, BY MINTING DECLARATION: the per-language edge builders `v2.extdeps.languages` `bash_named_edge`, `c_named_edge`, `c_decl_named_edge`, `cpp_named_edge`, `dag_named_edge` (its non-converted productions) and `dag_round_trip_edge`, `ecmascript_named_edge`, `english_named_edge`, `go_named_edge`, `java_named_edge`, `kotlin_named_edge`, `lean_named_edge`, `python_named_edge`, `rust_named_edge`, `swift_named_edge`, `swift_decl_named_edge`, `ts_named_edge`, `verilog_named_edge`, `wasm_named_edge`; the reflection builders `v2.std.compilers.target_model` `target_model_named_edge`, `v2.std.grammar` `grammar_named_edge` (including the four parse-projection labels `v2.compiler.parse` `parse_tree_projection_edge` rosters), `v2.std.fold_assembly` `named_edge`, `v2.std.integer` `integer_named_edge`, `v2.std.language_model` `language_model_named_edge`, `v2.std.logic` `bool_named_edge`, `v2.std.runtime` `runtime_value_named_edge`, `v2.std.node` `node_offset_named_edge`; and every caller of each. PREVIOUS RUNG: below the floor (one Symbol space). TEMPORARY RUNG: unchanged for this population -- an authored spelling can still inhabit a text comparison inside the Authored arm. TRIGGER, NAMING THE CAPABILITY: every grammar-emitted label is minted Structural -- each language's grammar fold mints ProductionEdge for its productions and the parse-projection roster is Core -- so no Authored label is grammar-emitted and no reader compares a grammar label by text.",
],

evidence: [
DeclarationRef { module_path: "v2.test.claim.edge_label.structural_label_readers", decl_name: "the_header_edges_are_metadata_and_their_spellings_are_not", field: WholeDeclaration },
DeclarationRef { module_path: "v2.test.claim.edge_label.structural_label_readers", decl_name: "a_member_spelled_like_the_header_does_not_make_a_module_root", field: WholeDeclaration },
DeclarationRef { module_path: "v2.test.claim.edge_label.structural_label_readers", decl_name: "a_field_spelled_like_the_where_clause_is_not_one", field: WholeDeclaration },
DeclarationRef { module_path: "v2.test.claim.edge_label.structural_label_readers", decl_name: "a_scope_spelled_like_import_syntax_is_not_import_syntax", field: WholeDeclaration },
DeclarationRef { module_path: "v2.test.claim.edge_label.structural_label_readers", decl_name: "an_authored_name_spelled_like_a_core_marker_is_not_the_marker", field: WholeDeclaration },
DeclarationRef { module_path: "v2.test.claim.body_cast_node", decl_name: "bcn_a_foreign_label_on_a_transform_refuses", field: WholeDeclaration },
DeclarationRef { module_path: "v2.test.claim.body_cast_node", decl_name: "bcn_a_loop_passes_the_resolver_gate", field: WholeDeclaration },
DeclarationRef { module_path: "v2.test.claim.body_let_annotation", decl_name: "bla_bind_admits_only_its_annotation_label", field: WholeDeclaration },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ data generic_type_parameter_resolved_as_an_ordinary_atom_in_v2: RecurringFailure
"NEXT-RUNG TRIGGERS, each naming a capability. (1) TYPE DECLARATIONS -- DISCHARGED for records, coproducts, aliases and bodyless declarations; what still refuses uncarried is a right-hand side that is none of the three. (2) A BODY TYPE POSITION: the first type position body lowering carries (a `let` annotation, a lambda parameter type) needs a position-aware type frame -- one answering in type positions only -- before the fn's frame may widen from its signature to its body; a frame over the whole body was measured to admit `fn f<T>(x: T) -> T { T }`, a type used as a value. (3) EMISSION: a target grammar row rendering a type-parameter list, replacing the serializer's refusals for fns and type declarations. (4) NESTED AND RETURN INSTANTIATION in infer: v2.std.inhabitance inhabitance_formal_declaration recognizes a type variable only when a formal's WHOLE declared type is the bare binder, so a formal `List<T>` still takes the counted UndecidableGenericFormal frontier (an Instantiation formal), and the declared return type is never instantiated from the arguments; the trigger is instantiation that substitutes through a formal's structure and into the codomain (review 70847). A lambda's own Arrow opens its own frame through resolve_arrow_node, so gunbc#12210's fresh lambda type parameter does not wait on (2).",
],
evidence: [
DeclarationRef { module_path: "v2.std.type_binder", decl_name: "type_params_marker", field: WholeDeclaration },
DeclarationRef { module_path: "v2.std.type_binder", decl_name: "type_params_edge", field: WholeDeclaration },
DeclarationRef { module_path: "v2.std.node", decl_name: "type_binder_conj_conforms", field: WholeDeclaration },
DeclarationRef { module_path: "v2.std.type_binder", decl_name: "type_decl_wrapper", field: WholeDeclaration },
DeclarationRef { module_path: "v2.std.type_binder", decl_name: "type_decl_view", field: WholeDeclaration },
Expand Down
2 changes: 1 addition & 1 deletion dag/gunbc/scm/commit_closure_json_v2.dag
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ import extdeps.languages.json.parse {

import v2.std.node {
EdgeLabel,
Named,
Authored,
Positional,
NodeKind,
TypeNode,
Expand Down
4 changes: 2 additions & 2 deletions dag/gunbc/scm/object_store.dag
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import v2.std.node {
Conj,
Edge,
EdgeLabel,
Named,
Authored,
Symbol,
content_hash,
node_synthetic,
Expand Down Expand Up @@ -1513,7 +1513,7 @@ fn collision_probe_atom(identity: Symbol) -> Node {
fn collision_probe_parent(child: Node) -> Node {
node_synthetic(
kind: TypeNode { connective: Conj },
children: [Edge { label: Named { name: ^only_child }, target: child }],
children: [Edge { label: Authored { name: ^only_child }, target: child }],
)
}

Expand Down
79 changes: 76 additions & 3 deletions dag/gunbc/scm/object_table_json.dag
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ import extdeps.languages.json.parse {
}
import v2.std.node {
EdgeLabel,
Named,
Authored, StructuralLabel, CoreMarker, ProductionEdge, core_edge_label_canonical_symbol,
Positional,
NodeKind,
TypeNode,
Expand All @@ -232,6 +232,9 @@ import v2.std.node {
Symbol,
symbol_intern_lexeme,
symbol_lexeme,
core_edge_label,
core_edge_labels,
production_edge_label,
}
import v2.std.collection {
Map,
Expand Down Expand Up @@ -263,6 +266,8 @@ type NodeEntryMemberContext
| NodeEntryAtomKindMembers
| NodeEntryComputationKindMembers
| NodeEntryNamedEdgeMembers
| NodeEntryCoreMarkerEdgeMembers
| NodeEntryProductionEdgeMembers
| NodeEntryPositionalEdgeMembers

type NodeEntryDecodeRefusal
Expand Down Expand Up @@ -535,11 +540,22 @@ fn encode_kind(k: NodeKind) -> JsonValue {

fn encode_label(l: EdgeLabel) -> List<JsonKeyValue> {
match l {
Named { name: n } =>
Authored { name: n } =>
[
json_kv(key: "label", value: json_string(s: "named")),
json_kv(key: "name", value: json_string(s: symbol_lexeme(sym: n))),
]
StructuralLabel { label: CoreMarker { marker: m } } =>
[
json_kv(key: "label", value: json_string(s: "structural_core")),
json_kv(key: "marker", value: json_string(s: symbol_lexeme(sym: core_edge_label_canonical_symbol(marker: m)))),
]
StructuralLabel { label: ProductionEdge { language: lang, edge: p } } =>
[
json_kv(key: "label", value: json_string(s: "structural_production")),
json_kv(key: "language", value: json_string(s: symbol_lexeme(sym: lang))),
json_kv(key: "edge", value: json_string(s: symbol_lexeme(sym: p))),
]
Positional => [json_kv(key: "label", value: json_string(s: "positional"))]
}
}
Expand Down Expand Up @@ -970,12 +986,65 @@ fn decode_named_label(edge_value: JsonValue) -> LabelDecode {
match read_string_member(v: edge_value, key: "name") {
MemberFailed { cause: c } => LabelDecodeFailed { cause: NodeEntryMemberReadRefused { cause: c } }
MemberString { value: lexeme } =>
LabelDecoded { label: Named { name: symbol_intern_lexeme(lexeme: lexeme) } }
LabelDecoded { label: Authored { name: symbol_intern_lexeme(lexeme: lexeme) } }
_ => LabelDecodeFailed { cause: NodeEntryMemberReadRefused { cause: MemberReadWrongShape { key: "name" } } }
}
}
}

// A core marker travels as the marker's canonical symbol and comes back only as one of the closed
// set's arms: a symbol no arm spells is an unknown label and refuses, never an Authored fallback.
fn decode_core_marker_label(edge_value: JsonValue) -> LabelDecode {
match node_entry_member_set_refusal(
v: edge_value,
allowed: ["label", "marker", "target"],
context: NodeEntryCoreMarkerEdgeMembers
) {
Present { value: c } => LabelDecodeFailed { cause: c }
Absent =>
match read_string_member(v: edge_value, key: "marker") {
MemberFailed { cause: c } => LabelDecodeFailed { cause: NodeEntryMemberReadRefused { cause: c } }
MemberString { value: lexeme } => {
let sym = symbol_intern_lexeme(lexeme: lexeme)
fold(core_edge_labels(), init: LabelDecodeFailed { cause: NodeEntryUnknownLabelTag { found: lexeme } }, f: fn(acc, m) {
if core_edge_label_canonical_symbol(marker: m) == sym { LabelDecoded { label: core_edge_label(marker: m) } } else { acc }
})
}
MemberArray { elements: _ } => LabelDecodeFailed { cause: NodeEntryMemberReadRefused { cause: MemberReadWrongShape { key: "marker" } } }
MemberObject { value: _ } => LabelDecodeFailed { cause: NodeEntryMemberReadRefused { cause: MemberReadWrongShape { key: "marker" } } }
}
}
}

fn decode_production_label(edge_value: JsonValue) -> LabelDecode {
match node_entry_member_set_refusal(
v: edge_value,
allowed: ["label", "language", "edge", "target"],
context: NodeEntryProductionEdgeMembers
) {
Present { value: c } => LabelDecodeFailed { cause: c }
Absent =>
match read_string_member(v: edge_value, key: "language") {
MemberFailed { cause: c } => LabelDecodeFailed { cause: NodeEntryMemberReadRefused { cause: c } }
MemberString { value: language } =>
match read_string_member(v: edge_value, key: "edge") {
MemberFailed { cause: c } => LabelDecodeFailed { cause: NodeEntryMemberReadRefused { cause: c } }
MemberString { value: edge } =>
LabelDecoded {
label: production_edge_label(
language: symbol_intern_lexeme(lexeme: language),
edge: symbol_intern_lexeme(lexeme: edge)
)
}
MemberArray { elements: _ } => LabelDecodeFailed { cause: NodeEntryMemberReadRefused { cause: MemberReadWrongShape { key: "edge" } } }
MemberObject { value: _ } => LabelDecodeFailed { cause: NodeEntryMemberReadRefused { cause: MemberReadWrongShape { key: "edge" } } }
}
MemberArray { elements: _ } => LabelDecodeFailed { cause: NodeEntryMemberReadRefused { cause: MemberReadWrongShape { key: "language" } } }
MemberObject { value: _ } => LabelDecodeFailed { cause: NodeEntryMemberReadRefused { cause: MemberReadWrongShape { key: "language" } } }
}
}
}

fn decode_positional_label(edge_value: JsonValue) -> LabelDecode {
match node_entry_member_set_refusal(
v: edge_value,
Expand All @@ -993,6 +1062,10 @@ fn decode_label(edge_value: JsonValue) -> LabelDecode {
MemberString { value: tag } =>
if tag == "named" {
decode_named_label(edge_value: edge_value)
} else if tag == "structural_core" {
decode_core_marker_label(edge_value: edge_value)
} else if tag == "structural_production" {
decode_production_label(edge_value: edge_value)
} else if tag == "positional" {
decode_positional_label(edge_value: edge_value)
} else {
Expand Down
Loading