v1.4.0 release: live-coding scratch editor, interpreted Graph DSL, ClosureSynthesizer + SampleLoop
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
// DSLProgram.swift
|
||||
// Lyrebird
|
||||
//
|
||||
// Copyright (c) 2026 Joshua Parmenter / realizedsound
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
// A parsed DSL program: a sequence of statements, each either an anonymous
|
||||
// output expression or a named-slot assignment.
|
||||
|
||||
/// A parsed DSL program.
|
||||
public struct DSLProgram: Equatable, Sendable {
|
||||
|
||||
/// One top-level statement.
|
||||
public enum Statement: Equatable, Sendable {
|
||||
/// `name = expr` — bind the graph to a named slot.
|
||||
case assignment(name: String, value: DSLExpr, DSLSpan)
|
||||
/// A bare expression — an anonymous output.
|
||||
case expression(DSLExpr)
|
||||
}
|
||||
|
||||
public let statements: [Statement]
|
||||
|
||||
public init(statements: [Statement]) {
|
||||
self.statements = statements
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user