Files
Lyrebird/LiveCompile/Sources/LyrebirdLiveCompile/WrappedSnippet.swift
T

23 lines
609 B
Swift

// WrappedSnippet.swift
// Lyrebird
//
// Copyright (c) 2026 Joshua Parmenter / realizedsound
// SPDX-License-Identifier: MIT
// LyrebirdLiveCompile
//
// Output of `SnippetHarness.wrap(userBody:)`. Carries the full Swift source
// that `swiftc` will compile, plus the 1-based line number on which the user's
// body begins. The diagnostic parser subtracts `userBodyLineOffset - 1`
// from each swiftc-reported line so error rows point back at the row the user
// typed.
#if os(macOS)
public struct WrappedSnippet: Equatable {
public let source: String
public let userBodyLineOffset: Int
}
#endif