def descriptor

bendvy-ecs-core@0.1.0.4 · restore_graph_validation.bend:17

import bendvy-ecs-core@0.1.0.4/restore_graph_validation.bend as RestoreGraphValidation
import Base
import bendvy-ecs-core@0.1.0.4/relation_types.bend as G
import bendvy-ecs-core@0.1.0.4/relation_graph.bend as Graph
import bendvy-ecs-core@0.1.0.4/relation_failure_reader.bend as Ordinary

17def descriptor(~S:Data,+name:String,declarations:List<&2,Ordinary.Declaration<S>>) -> Maybe<&2,G.Descriptor<S>>:
18  match declarations:
19    case []:None{}
20    case Ordinary.Declaration{+value} <> rest:descriptor_found(~S,String.eq(name,Graph.name(~S,value)),value,_ => descriptor(~S,name,rest))

Uses (8)

Used by (1)