Explorer

core.compile-collect-quote-strings

description
Adds the string of the parts' definitions that each quote in expr holds (core.quote-parts, following the references in parts) to strings, so that the compiled quote holds it as string data (core.compile-module)
type
Fn(
  expr: @core.expression,
  parts: List<Record{id: String, expression: @core.expression}>,
  strings: List<String>
) -> List<String>
expression
fn(expr$0, parts$1, strings$2) =>
  match $0 {
    #quote(quoted$3) =>
      @core.compile-add-string(
        strings: $2,
        value: @core.quote-parts(ids: @core.quote-part-ids(expr: $3, found: [], parts: $1), parts: $1)
      ),
    _ =>
      @core.list-fold(
        T: @core.expression,
        A: List<String>,
        reducer: fn(acc$6, item$7) =>
          @core.compile-collect-quote-strings(expr: $7, parts: $1, strings: $6),
        init: $2,
        xs: @core.expression-children(expr: $0)
      )
  }
visibility
public
core.compile-collect-quote-strings (project definy, branch main, snapshot l0VFjJZP174d8CbZWFoujAGTYjgsQu4uTq5uWCZaXgo)
id: nQS2mo2Y5SA1g1z92x0AUIRP4UUzZoKac3vyMtjRRPQ
content hash: TRjuSX4o7WcxSep-TY6hppXuyao6AvHsXA3PWNyaMMA