Skip to content

Commit 93d42d4

Browse files
committed
Rename _MatchingEngine module to _RegexParser
1 parent 66999ce commit 93d42d4

File tree

14 files changed

+46
-34
lines changed

14 files changed

+46
-34
lines changed

SwiftCompilerSources/Package.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ let package = Package(
1111
.library(
1212
name: "Swift",
1313
type: .static,
14-
targets: ["SIL", "Optimizer", "ExperimentalRegex"]),
14+
targets: ["SIL", "Optimizer", "_RegexParser"]),
1515
],
1616
dependencies: [
1717
],
@@ -26,15 +26,15 @@ let package = Package(
2626
"-cross-module-optimization"
2727
])]),
2828
.target(
29-
name: "ExperimentalRegex",
29+
name: "_RegexParser",
3030
dependencies: [],
3131
swiftSettings: [SwiftSetting.unsafeFlags([
3232
"-I", "../include/swift",
3333
"-cross-module-optimization"
3434
])]),
3535
.target(
3636
name: "Optimizer",
37-
dependencies: ["SIL", "ExperimentalRegex"],
37+
dependencies: ["SIL", "_RegexParser"],
3838
swiftSettings: [SwiftSetting.unsafeFlags([
3939
"-I", "../include/swift",
4040
"-cross-module-optimization"

SwiftCompilerSources/Sources/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
add_subdirectory(Basic)
1212
add_subdirectory(AST)
1313
if(SWIFT_ENABLE_EXPERIMENTAL_STRING_PROCESSING)
14-
add_subdirectory(ExperimentalRegex)
14+
add_subdirectory(_RegexParser)
1515
endif()
1616
add_subdirectory(SIL)
1717
add_subdirectory(Optimizer)

SwiftCompilerSources/Sources/Optimizer/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
set(dependencies)
1010
list(APPEND dependencies Basic SIL)
1111
if(SWIFT_ENABLE_EXPERIMENTAL_STRING_PROCESSING)
12-
list(APPEND dependencies ExperimentalRegex)
12+
list(APPEND dependencies _RegexParser)
1313
endif()
1414

1515
add_swift_compiler_module(Optimizer DEPENDS ${dependencies})

SwiftCompilerSources/Sources/Optimizer/PassManager/PassRegistration.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,16 @@
1313
import SIL
1414
import OptimizerBridging
1515

16-
#if canImport(ExperimentalRegex)
17-
import ExperimentalRegex
16+
#if canImport(_RegexParser)
17+
import _RegexParser
1818
#endif
1919

2020
@_cdecl("initializeSwiftModules")
2121
public func initializeSwiftModules() {
2222
registerSILClasses()
2323
registerSwiftPasses()
2424

25-
#if canImport(ExperimentalRegex)
25+
#if canImport(_RegexParser)
2626
registerRegexParser()
2727
#endif
2828
}

SwiftCompilerSources/Sources/ExperimentalRegex/CMakeLists.txt renamed to SwiftCompilerSources/Sources/_RegexParser/CMakeLists.txt

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,15 @@
66
# See http://swift.org/LICENSE.txt for license information
77
# See http://swift.org/CONTRIBUTORS.txt for Swift project authors
88

9-
file(GLOB_RECURSE _LIBSWIFT_EXPERIMENTAL_REGEX_SOURCES
10-
"${EXPERIMENTAL_STRING_PROCESSING_SOURCE_DIR}/Sources/_MatchingEngine/*.swift")
11-
set(LIBSWIFT_EXPERIMENTAL_REGEX_SOURCES)
12-
foreach(source ${_LIBSWIFT_EXPERIMENTAL_REGEX_SOURCES})
9+
file(GLOB_RECURSE _LIBSWIFT_REGEX_PARSER_SOURCES
10+
"${EXPERIMENTAL_STRING_PROCESSING_SOURCE_DIR}/Sources/_RegexParser/*.swift")
11+
set(LIBSWIFT_REGEX_PARSER_SOURCES)
12+
foreach(source ${_LIBSWIFT_REGEX_PARSER_SOURCES})
1313
file(TO_CMAKE_PATH "${source}" source)
14-
list(APPEND LIBSWIFT_EXPERIMENTAL_REGEX_SOURCES ${source})
14+
list(APPEND LIBSWIFT_REGEX_PARSER_SOURCES ${source})
1515
endforeach()
16-
message(STATUS "Using Experimental String Processing library for libswift ExperimentalRegex (${EXPERIMENTAL_STRING_PROCESSING_SOURCE_DIR}).")
16+
message(STATUS "Using Experimental String Processing library for libswift _RegexParser (${EXPERIMENTAL_STRING_PROCESSING_SOURCE_DIR}).")
1717

18-
add_swift_compiler_module(ExperimentalRegex
19-
"${LIBSWIFT_EXPERIMENTAL_REGEX_SOURCES}"
18+
add_swift_compiler_module(_RegexParser
19+
"${LIBSWIFT_REGEX_PARSER_SOURCES}"
2020
Regex.swift)
21-

SwiftCompilerSources/Sources/ExperimentalRegex/Regex.swift renamed to SwiftCompilerSources/Sources/_RegexParser/Regex.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import ExperimentalRegexBridging
1+
import _RegexParserBridging
22

33
public func registerRegexParser() {
44
Parser_registerRegexLiteralParsingFn(libswiftParseRegexLiteral)

include/swift/Parse/ExperimentalRegexBridging.h renamed to include/swift/Parse/RegexParserBridging.h

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,18 @@
1-
#ifndef EXPERIMENTAL_REGEX_BRIDGING
2-
#define EXPERIMENTAL_REGEX_BRIDGING
1+
//===-- RegexParserBridging.h --- Regex parser interface -*- C++ -*-===//
2+
//
3+
// This source file is part of the Swift.org open source project
4+
//
5+
// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
6+
// Licensed under Apache License v2.0 with Runtime Library Exception
7+
//
8+
// See https://swift.org/LICENSE.txt for license information
9+
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
10+
//
11+
//===----------------------------------------------------------------------===//
12+
13+
14+
#ifndef REGEX_PARSER_BRIDGING
15+
#define REGEX_PARSER_BRIDGING
316

417
#include <stdbool.h>
518

@@ -46,4 +59,4 @@ void Parser_registerRegexLiteralParsingFn(RegexLiteralParsingFn fn);
4659
} // extern "C"
4760
#endif
4861

49-
#endif // EXPERIMENTAL_REGEX_BRIDGING
62+
#endif // REGEX_PARSER_BRIDGING

include/swift/module.modulemap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ module OptimizerBridging {
1919
export *
2020
}
2121

22-
module ExperimentalRegexBridging {
23-
header "Parse/ExperimentalRegexBridging.h"
22+
module _RegexParserBridging {
23+
header "Parse/RegexParserBridging.h"
2424
export *
2525
}

lib/Parse/Lexer.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
#include "swift/AST/Identifier.h"
2121
#include "swift/Basic/LangOptions.h"
2222
#include "swift/Basic/SourceManager.h"
23-
#include "swift/Parse/ExperimentalRegexBridging.h"
23+
#include "swift/Parse/RegexParserBridging.h"
2424
#include "swift/Syntax/Trivia.h"
2525
#include "llvm/Support/Compiler.h"
2626
#include "llvm/Support/MathExtras.h"
@@ -34,7 +34,7 @@
3434
#include <limits>
3535

3636
// Regex lexing delivered via libSwift.
37-
#include "swift/Parse/ExperimentalRegexBridging.h"
37+
#include "swift/Parse/RegexParserBridging.h"
3838
static RegexLiteralLexingFn regexLiteralLexingFn = nullptr;
3939
void Parser_registerRegexLiteralLexingFn(RegexLiteralLexingFn fn) {
4040
regexLiteralLexingFn = fn;

lib/Parse/ParseRegex.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
#include "swift/Syntax/SyntaxKind.h"
2222

2323
// Regex parser delivered via Swift modules.
24-
#include "swift/Parse/ExperimentalRegexBridging.h"
24+
#include "swift/Parse/RegexParserBridging.h"
2525
static RegexLiteralParsingFn regexLiteralParsingFn = nullptr;
2626
void Parser_registerRegexLiteralParsingFn(RegexLiteralParsingFn fn) {
2727
regexLiteralParsingFn = fn;

0 commit comments

Comments
 (0)