Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions Sources/Compiler/Implementation/CompilerImpl.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ internal final class CompilerImpl: ASTVisitor, StatementVisitor, ExpressionVisit
internal typealias StatementResult = Void
internal typealias ExpressionResult = Void

// For Swift 6.1 compatibility with Foundation.
internal typealias Expression = VioletParser.Expression

/// Program that we are compiling.
private let ast: AST
/// Name of the file that this code object was loaded from.
Expand Down
3 changes: 3 additions & 0 deletions Tests/CompilerTests/ASTCreator.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ internal protocol ASTCreator {}

extension ASTCreator {

// For Swift 6.1 compatibility with Foundation.
typealias Expression = VioletParser.Expression

private var id: ASTNodeId {
// We have to increment 'id', because it is used as a key in 'SymbolTable'.
let value = _id
Expand Down
3 changes: 3 additions & 0 deletions Tests/CompilerTests/CompileTestCase.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ import VioletBytecode
/// Base class for all of the compiler tests
internal class CompileTestCase: XCTestCase, ASTCreator {

// For Swift 6.1 compatibility with Foundation.
typealias Expression = VioletParser.Expression

internal var builder = ASTBuilder()

// MARK: - Compile
Expand Down
3 changes: 3 additions & 0 deletions Tests/CompilerTests/SymbolTableTestCase.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ import VioletParser
/// Base class for all of the symbol table tests
class SymbolTableTestCase: XCTestCase, ASTCreator {

// For Swift 6.1 compatibility with Foundation.
typealias Expression = VioletParser.Expression

var builder = ASTBuilder()

// MARK: - Create
Expand Down
8 changes: 4 additions & 4 deletions Tests/RapunzelTests/Lyrics.swift
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ extension Lyrics {
"And it's warm and real and bright",
"And the world has somehow shifted",
"All at once everything looks different",
"Now that I see you"
"Now that I see you",
]
),

Expand All @@ -68,7 +68,7 @@ extension Lyrics {
"Now she's here shining in the starlight",
"Now she's here suddenly I know",
"If she's here it's crystal clear",
"I'm where I'm meant to go"
"I'm where I'm meant to go",
]
),
Part(
Expand All @@ -95,9 +95,9 @@ extension Lyrics {
"All at once everything is different",
"Now that I see you",

"Now that I see you"
"Now that I see you",
]
)
),
]
}
}