Make Formatter Happy
Continuous Integration / Grammar Tests (push) Failing after 5s
Continuous Integration / Library Tests (push) Failing after 5s
Continuous Integration / Library Format Tests (push) Failing after 6s

Signed-off-by: Will Hawkins <hawkinsw@obs.cr>
This commit is contained in:
Will Hawkins
2026-05-04 22:25:51 -04:00
parent 7a36ca32dd
commit dd0bbbe479
3 changed files with 19 additions and 16 deletions
+1 -1
View File
@@ -70,7 +70,7 @@ public struct ErrorWithLocation: Errorable, Equatable, CustomStringConvertible {
public struct Errors: Errorable, CustomStringConvertible { public struct Errors: Errorable, CustomStringConvertible {
public func format(_ formatter: any Formattable) -> String { public func format(_ formatter: any Formattable) -> String {
self.errors.map() { error in self.errors.map { error in
error.format(formatter) error.format(formatter)
}.joined(separator: "\n") }.joined(separator: "\n")
} }
+4 -2
View File
@@ -169,7 +169,8 @@ public struct Parser {
current_context = updated_context current_context = updated_context
parsed_s.append(parsed_statement) parsed_s.append(parsed_statement)
case .Error(let e): case .Error(let e):
errors = if let errors = errors { errors =
if let errors = errors {
errors.append(error: e) errors.append(error: e)
} else { } else {
e e
@@ -255,7 +256,8 @@ public struct Parser {
parsed_s = state_statements parsed_s = state_statements
current_context = updated_context current_context = updated_context
case .Error(let error): case .Error(let error):
errors = if let errors = errors { errors =
if let errors = errors {
errors.append(error: error) errors.append(error: error)
} else { } else {
error error
+2 -1
View File
@@ -90,7 +90,8 @@ public struct Program {
break break
case .Error(let e): case .Error(let e):
found_parser = true found_parser = true
errors = if let errors = errors { errors =
if let errors = errors {
errors.append(error: e) errors.append(error: e)
} else { } else {
e e