From f8d6e463f925646060b7958ba912505892552c3f Mon Sep 17 00:00:00 2001 From: wes Date: Wed, 18 Feb 2026 20:32:23 -0500 Subject: [PATCH] Add semicolon if needed --- Sources/Compiler/Config.swift | 10 ++++++++-- Sources/Compiler/Gen/Rewriter.swift | 8 +++++++- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/Sources/Compiler/Config.swift b/Sources/Compiler/Config.swift index 0848b66..3a7e0b9 100644 --- a/Sources/Compiler/Config.swift +++ b/Sources/Compiler/Config.swift @@ -31,8 +31,14 @@ public struct Config: Codable { } public init(at path: String) throws { - guard var url = URL(string: path) else { - throw ConfigError.invalidURL(path) + var url: URL + if path.hasPrefix("file://") { + guard let u = URL(string: path) else { + throw ConfigError.invalidURL(path) + } + url = u + } else { + url = URL(fileURLWithPath: path) } if url.lastPathComponent != "puresql.yaml" { diff --git a/Sources/Compiler/Gen/Rewriter.swift b/Sources/Compiler/Gen/Rewriter.swift index d700358..d0f45ad 100644 --- a/Sources/Compiler/Gen/Rewriter.swift +++ b/Sources/Compiler/Gen/Rewriter.swift @@ -40,7 +40,13 @@ struct Rewriter { final.append(contentsOf: source[start..