Explorer

core.quote-part-ids

description
Adds the ids of the parts the expression references (following the references) to found
type
Fn(
  expr: @core.expression,
  found: List<String>,
  parts: List<Record{id: String, expression: @core.expression}>
) -> List<String>
expression
fn(expr$0, found$1, parts$2) =>
  match $0 {
    #part_reference(reference$3) =>
      let id$4 = $3.part_definition_event_hash;
      match @core.list-contains-string(list: $1, target: $4, index: 0) {
        true =>
          $1,
        false =>
          let found_part$5 = @core.quote-find-part(parts: $2, id: $4, index: 0);
          match @core.list-get(list: $5, index: 0) {
            #none(_) =>
              @core.list-append(list: $1, item: $4),
            #some(item$1007) =>
              @core.quote-part-ids(expr: $1007.expression, found: @core.list-append(list: $1, item: $4), parts: $2)
          }
      },
    _$6 =>
      @core.quote-part-ids-in-list(items: @core.expression-children(expr: $0), index: 0, found: $1, parts: $2)
  }
visibility
public
core.quote-part-ids (project definy, branch auto-release, snapshot oiQgPqhJm-TbM4kexXeRHBaJB_tS7gwBSewII64P-44)
id: OkGon0nCBsBCIwJysPNmW_cXGnfheNrRi-VzApxH4do
content hash: zXK48Itya13ooPLQKubOB70UkkGvbNs4Fzm20j8KlGE