Skip to content

Commit 3f24f5b

Browse files
committed
Internalize declarations
Lots of ME stuff was annotated with vestigial public
1 parent 8144b3a commit 3f24f5b

24 files changed

+215
-254
lines changed

Sources/Prototypes/PEG/PEGCode.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
//
1010
//===----------------------------------------------------------------------===//
1111

12-
import _StringProcessing
12+
@testable import _StringProcessing
1313

1414
extension PEG.VM {
1515
struct Code {

Sources/Prototypes/PEG/PEGCompile.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
//
1010
//===----------------------------------------------------------------------===//
1111

12-
import _StringProcessing
12+
@testable import _StringProcessing
1313

1414
extension PEG.VM {
1515
typealias InIndex = Input.Index

Sources/Prototypes/PEG/PEGCore.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
//
1010
//===----------------------------------------------------------------------===//
1111

12-
import _StringProcessing
12+
@testable import _StringProcessing
1313
let emitComments = true
1414

1515
struct PEGCore<

Sources/Prototypes/PEG/PEGTranspile.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@
99
//
1010
//===----------------------------------------------------------------------===//
1111

12-
import _MatchingEngine
13-
import _StringProcessing
12+
@testable import _StringProcessing
1413

1514
extension PEG.VM where Input == String {
1615
typealias MEProg = MEProgram<String>

Sources/Prototypes/PEG/PEGVM.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
//
1010
//===----------------------------------------------------------------------===//
1111

12-
import _StringProcessing
12+
13+
@testable import _StringProcessing
1314

1415
extension PEG {
1516

Sources/Prototypes/PEG/Printing.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
//
1010
//===----------------------------------------------------------------------===//
1111

12-
import _StringProcessing
12+
@testable import _StringProcessing
1313

1414
extension PEGCore.Instruction: InstructionProtocol {
1515
var operandPC: InstructionAddress? { self.pc }

Sources/_StringProcessing/Compiler.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class Compiler {
3535
}
3636
}
3737

38-
public func _compileRegex(
38+
func _compileRegex(
3939
_ regex: String, _ syntax: SyntaxOptions = .traditional
4040
) throws -> Executor {
4141
let ast = try parse(regex, syntax)

Sources/_StringProcessing/Engine/Consume.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@ extension Engine {
2525
}
2626

2727
extension Engine where Input == String {
28-
public func consume(
28+
func consume(
2929
_ input: Input
3030
) -> (Input.Index, CaptureList)? {
3131
consume(input, in: input.startIndex ..< input.endIndex)
3232
}
3333

34-
public func consume(
34+
func consume(
3535
_ input: Input,
3636
in range: Range<Input.Index>,
3737
matchMode: MatchMode = .partialFromFront

Sources/_StringProcessing/Engine/Engine.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
// Currently, engine binds the type and consume binds an instance.
1313
// But, we can play around with this.
14-
public struct Engine<Input: BidirectionalCollection> where Input.Element: Hashable {
14+
struct Engine<Input: BidirectionalCollection> where Input.Element: Hashable {
1515

1616
var program: MEProgram<Input>
1717

@@ -24,7 +24,7 @@ public struct Engine<Input: BidirectionalCollection> where Input.Element: Hashab
2424
set { program.enableTracing = newValue }
2525
}
2626

27-
public init(
27+
init(
2828
_ program: MEProgram<Input>,
2929
enableTracing: Bool? = nil
3030
) {
@@ -36,10 +36,10 @@ public struct Engine<Input: BidirectionalCollection> where Input.Element: Hashab
3636
}
3737
}
3838

39-
public struct AsyncEngine { /* ... */ }
39+
struct AsyncEngine { /* ... */ }
4040

4141
extension Engine: CustomStringConvertible {
42-
public var description: String {
42+
var description: String {
4343
// TODO: better description
4444
return program.description
4545
}

Sources/_StringProcessing/Engine/Instruction.swift

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -299,8 +299,7 @@ extension Instruction {
299299

300300
internal var _opcodeMask: UInt64 { 0xFF00_0000_0000_0000 }
301301

302-
// TODO: internal after compiler moves in
303-
public var _payloadMask: UInt64 { ~_opcodeMask }
302+
var _payloadMask: UInt64 { ~_opcodeMask }
304303

305304
extension Instruction {
306305
var opcodeMask: UInt64 { 0xFF00_0000_0000_0000 }

0 commit comments

Comments
 (0)