Skip to content

Commit 848df95

Browse files
committed
Remove remaining references to gyb
1 parent 9dff225 commit 848df95

40 files changed

+37
-109405
lines changed

CodeGeneration/README.md

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,6 @@
22

33
This directory contains file to generate source code that is part of the SwiftSyntax package. If you are looking to generate Swift code yourself, you might be interested in [SwiftSyntaxBuilder](../Sources/SwiftSyntaxBuilder).
44

5-
SwiftSyntax currently uses two mechanisms to generate source code: gyb and SwiftSyntaxBuilder. Both can be run using
6-
7-
```bash
8-
./build-script.py generate-source-code --toolchain /path/to/toolchain.xctoolchain/usr
9-
```
10-
11-
## `gyb`
12-
13-
Files generated using `gyb` have a `.gyb` suffix. [ChangingSwiftSyntax.md](../Sources/SwiftSyntax/Documentation.docc/ChangingSwiftSyntax.md) contains documentation how `gyb` works. This directory contains the definitions that back most of gyb-generation in `gyb_syntax_support`.
14-
15-
## `SwiftSyntaxBuilder`
16-
175
Some source code inside SwiftSyntax is generated using [SwiftSyntaxBuilder](../Sources/SwiftSyntaxBuilder), a Swift library whose purpose is to generate Swift code using Swift itself. This kind of code generation is performed by the Swift package defined in this directory.
186

19-
This directory is a standalone package that uses a pinned version of SwiftSyntaxBuilder. It is thus NOT using SwiftSyntaxBuilder of the parent directory. This guarantees that when `generate-swiftsyntaxbuilder` is run, it can't break its own build.
7+
This directory is a standalone package that uses a pinned version of SwiftSyntaxBuilder. It is thus NOT using SwiftSyntaxBuilder of the parent directory. This guarantees that when `generate-swiftsyntaxbuilder` is run, it can't break its own build.

CodeGeneration/Sources/Utils/SyntaxBuildableType.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public struct SyntaxBuildableType: Hashable {
2626
public init(syntaxKind: String, isOptional: Bool = false) {
2727
self.isOptional = isOptional
2828
if syntaxKind.hasSuffix("Token") {
29-
// There are different token kinds but all of them are represented by `Token` in the Swift source (see `kind_to_type` in `gyb_syntax_support`).
29+
// There are different token kinds but all of them are represented by `Token` in the Swift source (see `kindToType` in `SyntaxSupport/Utils.swift`).
3030
self.syntaxKind = "Token"
3131
self.tokenKind = syntaxKind
3232
} else {

CodeGeneration/Sources/Utils/Utils.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ public func dedented(string: String) -> String {
2222
}
2323

2424
/// Creates a single-line documentation string from indented
25-
/// documentation as written in `gyb_syntax_support`.
25+
/// documentation as written in `CodeGeneration`.
2626
public func flattened(indentedDocumentation: String) -> String {
2727
dedented(string: indentedDocumentation)
2828
.replacingOccurrences(of: "\n", with: "")

CodeGeneration/Sources/generate-swiftsyntax/templates/swiftsyntax/SyntaxNodeFile.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import SwiftSyntaxBuilder
1515
import SyntaxSupport
1616
import Utils
1717

18-
/// This gyb-file generates the syntax nodes for SwiftSyntax. To keep the generated
18+
/// This file generates the syntax nodes for SwiftSyntax. To keep the generated
1919
/// files at a managable file size, it is to be invoked multiple times with the
2020
/// variable `emitKind` set to a base kind listed in
2121
/// It then only emits those syntax nodes whose base kind are that specified kind.

Sources/IDEUtils/generated/SyntaxClassification.swift

Lines changed: 0 additions & 215 deletions
This file was deleted.

0 commit comments

Comments
 (0)