Skip to content

Commit 409f69a

Browse files
committed
Enable DSLList as default
This likely involves an increase in compilation time, since the list needs to be generated from the tree before compiling.
1 parent 467e885 commit 409f69a

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

Sources/_StringProcessing/Compiler.swift

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ class Compiler {
3232
}
3333

3434
__consuming func emit() throws -> MEProgram {
35+
try emitViaList()
36+
}
37+
38+
__consuming func emitViaTree() throws -> MEProgram {
3539
// TODO: Handle global options
3640
var codegen = ByteCodeGen(
3741
options: options,

Tests/RegexTests/MatchTests.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ func _validateListCompilation<T>(
4141
_ regex: Regex<T>
4242
) throws -> Bool {
4343
let treeCompiler = Compiler(tree: regex.program.tree)
44-
let treeProgram = try treeCompiler.emit()
44+
let treeProgram = try treeCompiler.emitViaTree()
4545
let listCompiler = Compiler(tree: regex.program.tree)
4646
let listProgram = try listCompiler.emitViaList()
4747
return treeProgram.instructions == listProgram.instructions

0 commit comments

Comments
 (0)