Skip to content

[swift/main] Migrate to internal imports #756

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 26, 2024
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
2 changes: 1 addition & 1 deletion Sources/RegexBenchmark/Benchmark.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@_spi(RegexBenchmark) import _StringProcessing
@_implementationOnly import _RegexParser
internal import _RegexParser
import Foundation

protocol RegexBenchmark: Debug {
Expand Down
2 changes: 1 addition & 1 deletion Sources/RegexBuilder/Anchor.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
//
//===----------------------------------------------------------------------===//

@_implementationOnly import _RegexParser
internal import _RegexParser
@_spi(RegexBuilder) import _StringProcessing

/// A regex component that matches a specific condition at a particular position
Expand Down
2 changes: 1 addition & 1 deletion Sources/RegexBuilder/CharacterClass.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
//
//===----------------------------------------------------------------------===//

@_implementationOnly import _RegexParser
internal import _RegexParser
@_spi(RegexBuilder) import _StringProcessing

/// A class of characters that match in a regex.
Expand Down
2 changes: 1 addition & 1 deletion Sources/RegexBuilder/DSL.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
//
//===----------------------------------------------------------------------===//

@_implementationOnly import _RegexParser
internal import _RegexParser
@_spi(RegexBuilder) import _StringProcessing

@available(SwiftStdlib 5.7, *)
Expand Down
2 changes: 1 addition & 1 deletion Sources/_StringProcessing/ByteCodeGen.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
@_spi(_Unicode)
import Swift

@_implementationOnly import _RegexParser
internal import _RegexParser

extension Compiler {
struct ByteCodeGen {
Expand Down
2 changes: 1 addition & 1 deletion Sources/_StringProcessing/Capture.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
//
//===----------------------------------------------------------------------===//

@_implementationOnly import _RegexParser
internal import _RegexParser

// TODO: Where should this live? Inside TypeConstruction?
func constructExistentialOutputComponent(
Expand Down
2 changes: 1 addition & 1 deletion Sources/_StringProcessing/Compiler.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
//
//===----------------------------------------------------------------------===//

@_implementationOnly import _RegexParser
internal import _RegexParser

class Compiler {
let tree: DSLTree
Expand Down
2 changes: 1 addition & 1 deletion Sources/_StringProcessing/ConsumerInterface.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
//
//===----------------------------------------------------------------------===//

@_implementationOnly import _RegexParser
internal import _RegexParser

extension Character {
var _singleScalarAsciiValue: UInt8? {
Expand Down
2 changes: 1 addition & 1 deletion Sources/_StringProcessing/Engine/InstPayload.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
//
//===----------------------------------------------------------------------===//

@_implementationOnly import _RegexParser
internal import _RegexParser

extension Instruction {
/// An instruction's payload packs operands and destination
Expand Down
2 changes: 1 addition & 1 deletion Sources/_StringProcessing/Engine/MEBuilder.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
//
//===----------------------------------------------------------------------===//

@_implementationOnly import _RegexParser // For errors
internal import _RegexParser // For errors

extension MEProgram {
struct Builder {
Expand Down
2 changes: 1 addition & 1 deletion Sources/_StringProcessing/Engine/MEBuiltins.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@_implementationOnly import _RegexParser // For AssertionKind
internal import _RegexParser // For AssertionKind
extension Character {
var _isHorizontalWhitespace: Bool {
self.unicodeScalars.first?.isHorizontalWhitespace == true
Expand Down
2 changes: 1 addition & 1 deletion Sources/_StringProcessing/Engine/MECapture.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
//
//===----------------------------------------------------------------------===//

@_implementationOnly import _RegexParser
internal import _RegexParser

/*

Expand Down
2 changes: 1 addition & 1 deletion Sources/_StringProcessing/Engine/MEProgram.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
//
//===----------------------------------------------------------------------===//

@_implementationOnly import _RegexParser
internal import _RegexParser

struct MEProgram {
typealias Input = String
Expand Down
2 changes: 1 addition & 1 deletion Sources/_StringProcessing/Engine/Registers.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
//
//===----------------------------------------------------------------------===//

@_implementationOnly import _RegexParser
internal import _RegexParser

struct SentinelValue: Hashable, CustomStringConvertible {
var description: String { "<value sentinel>" }
Expand Down
2 changes: 1 addition & 1 deletion Sources/_StringProcessing/Engine/Structuralize.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
@_implementationOnly import _RegexParser
internal import _RegexParser

extension CaptureList {
@available(SwiftStdlib 5.7, *)
Expand Down
2 changes: 1 addition & 1 deletion Sources/_StringProcessing/Executor.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
//
//===----------------------------------------------------------------------===//

@_implementationOnly import _RegexParser
internal import _RegexParser

struct Executor {
// TODO: consider let, for now lets us toggle tracing
Expand Down
2 changes: 1 addition & 1 deletion Sources/_StringProcessing/LiteralPrinter.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
//
//===----------------------------------------------------------------------===//

@_implementationOnly import _RegexParser
internal import _RegexParser

@available(SwiftStdlib 5.7, *)
extension Regex {
Expand Down
2 changes: 1 addition & 1 deletion Sources/_StringProcessing/MatchingOptions.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
//
//===----------------------------------------------------------------------===//

@_implementationOnly import _RegexParser
internal import _RegexParser

/// A type that represents the current state of regex matching options, with
/// stack-based scoping.
Expand Down
2 changes: 1 addition & 1 deletion Sources/_StringProcessing/PrintAsPattern.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
//
//===----------------------------------------------------------------------===//

@_implementationOnly import _RegexParser
internal import _RegexParser

// TODO: Add an expansion level, both from top to bottom.
// After `printAsCanonical` is fleshed out, these two
Expand Down
2 changes: 1 addition & 1 deletion Sources/_StringProcessing/Regex/ASTConversion.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
//
//===----------------------------------------------------------------------===//

@_implementationOnly import _RegexParser
internal import _RegexParser

extension AST {
var dslTree: DSLTree {
Expand Down
2 changes: 1 addition & 1 deletion Sources/_StringProcessing/Regex/AnyRegexOutput.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
//
//===----------------------------------------------------------------------===//

@_implementationOnly import _RegexParser
internal import _RegexParser

/// The type-erased, dynamic output of a regular expression match.
///
Expand Down
2 changes: 1 addition & 1 deletion Sources/_StringProcessing/Regex/Core.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
//
//===----------------------------------------------------------------------===//

@_implementationOnly import _RegexParser
internal import _RegexParser

/// A type that represents a regular expression.
///
Expand Down
2 changes: 1 addition & 1 deletion Sources/_StringProcessing/Regex/DSLTree.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
//
//===----------------------------------------------------------------------===//

@_implementationOnly import _RegexParser
internal import _RegexParser

@_spi(RegexBuilder)
public struct DSLTree {
Expand Down
2 changes: 1 addition & 1 deletion Sources/_StringProcessing/Regex/Options.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
//
//===----------------------------------------------------------------------===//

@_implementationOnly import _RegexParser
internal import _RegexParser

@available(SwiftStdlib 5.7, *)
extension Regex {
Expand Down
2 changes: 1 addition & 1 deletion Sources/_StringProcessing/Utility/ASTBuilder.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ AST.

*/

@_implementationOnly import _RegexParser
internal import _RegexParser

func alt(_ asts: [AST.Node]) -> AST.Node {
return .alternation(
Expand Down
2 changes: 1 addition & 1 deletion Sources/_StringProcessing/Utility/TypeVerification.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
//
//===----------------------------------------------------------------------===//

@_implementationOnly import _RegexParser
internal import _RegexParser

@available(SwiftStdlib 5.7, *)
extension Regex {
Expand Down
2 changes: 1 addition & 1 deletion Sources/_StringProcessing/_CharacterClassModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
//
//===----------------------------------------------------------------------===//

@_implementationOnly import _RegexParser
internal import _RegexParser

// NOTE: This is a model type. We want to be able to get one from
// an AST, but this isn't a natural thing to produce in the context
Expand Down