Skip to content

Import _RegexParser as implementation only #287

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
Apr 15, 2022
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/_StringProcessing/ByteCodeGen.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import _RegexParser
@_implementationOnly 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 @@
//
//===----------------------------------------------------------------------===//

import _RegexParser
@_implementationOnly import _RegexParser

/// A structured capture
struct StructuredCapture {
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 @@
//
//===----------------------------------------------------------------------===//

import _RegexParser
@_implementationOnly 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 @@
//
//===----------------------------------------------------------------------===//

import _RegexParser
@_implementationOnly import _RegexParser

extension DSLTree.Node {
/// Attempt to generate a consumer from this AST node
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 @@
//
//===----------------------------------------------------------------------===//

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

extension MEProgram where Input.Element: Hashable {
struct Builder {
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 @@
//
//===----------------------------------------------------------------------===//

import _RegexParser
@_implementationOnly 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 @@
//
//===----------------------------------------------------------------------===//

import _RegexParser
@_implementationOnly import _RegexParser

struct MEProgram<Input: Collection> where Input.Element: Equatable {
typealias ConsumeFunction = (Input, Range<Input.Index>) -> Input.Index?
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 @@
//
//===----------------------------------------------------------------------===//

import _RegexParser
@_implementationOnly 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 @@
import _RegexParser
@_implementationOnly import _RegexParser

extension CaptureStructure {
var optionalCount: Int {
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 @@
//
//===----------------------------------------------------------------------===//

import _RegexParser
@_implementationOnly import _RegexParser

struct Executor {
// TODO: consider let, for now lets us toggle tracing
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 @@
//
//===----------------------------------------------------------------------===//

import _RegexParser
@_implementationOnly import _RegexParser

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

import _RegexParser
@_implementationOnly import _RegexParser

// TODO: Add an expansion level, both from top to bottom.
// After `printAsCanonical` is fleshed out, these two
// printers can call each other. This would enable
// incremental conversion, such that leaves remain
// as canonical regex literals.

@_spi(PatternConverter)
extension AST {
/// Render as a Pattern DSL
@_spi(PatternConverter)
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 @@
//
//===----------------------------------------------------------------------===//

import _RegexParser
@_implementationOnly 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 @@
//
//===----------------------------------------------------------------------===//

import _RegexParser
@_implementationOnly import _RegexParser

@available(SwiftStdlib 5.7, *)
extension Regex where Output == AnyRegexOutput {
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 @@
//
//===----------------------------------------------------------------------===//

import _RegexParser
@_implementationOnly 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 @@
//
//===----------------------------------------------------------------------===//

import _RegexParser
@_implementationOnly 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 @@
//
//===----------------------------------------------------------------------===//

import _RegexParser
@_implementationOnly import _RegexParser

@available(SwiftStdlib 5.7, *)
extension RegexComponent {
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.

*/

import _RegexParser
@_implementationOnly import _RegexParser

func alt(_ asts: [AST.Node]) -> AST.Node {
return .alternation(
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 @@
//
//===----------------------------------------------------------------------===//

import _RegexParser
@_implementationOnly 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