23 lines
631 B
Swift
23 lines
631 B
Swift
// WrappedSnippet.swift
|
|
// Lyrebird
|
|
//
|
|
// Copyright (c) 2026 Joshua Parmenter / realizedsound
|
|
// SPDX-License-Identifier: MIT
|
|
|
|
// LyrebirdLiveCompile — Phase 143
|
|
//
|
|
// 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. Phase 144's 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
|