Skip to content

Commit 081d9c4

Browse files
committed
Move examples to snippets
1 parent e07287b commit 081d9c4

File tree

7 files changed

+4
-45
lines changed

7 files changed

+4
-45
lines changed

Examples/Package.swift

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

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ Documentation can be found in the following places:
7676
- For the parser: [Sources/SwiftParser/SwiftParser.docc](Sources/SwiftParser/SwiftParser.docc)
7777
- You can either directly view this documentation on GitHub or build a documentation bundle by opening the project in Xcode and clicking Product -> Build Documentation
7878
- General documentation: [Documentation](Documentation)
79-
- Examples of using SwiftSyntax: [Examples](Examples).
79+
- Examples of using SwiftSyntax: [Snippets](Snippets).
8080

8181
## Contributing
8282

File renamed without changes.

Examples/README.md renamed to Snippets/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Examples
1+
# Snippets (Examples)
22

33
Each example can be executed by navigating into this folder and running `swift run <example> <arguments>`. There is the following set of examples available:
44

build-script.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515

1616
PACKAGE_DIR = os.path.dirname(os.path.realpath(__file__))
1717
WORKSPACE_DIR = os.path.dirname(PACKAGE_DIR)
18-
EXAMPLES_DIR = os.path.join(PACKAGE_DIR, "Examples")
1918
SOURCES_DIR = os.path.join(PACKAGE_DIR, "Sources")
2019
IDEUTILS_DIR = os.path.join(SOURCES_DIR, "IDEUtils")
2120
SWIFTSYNTAX_DIR = os.path.join(SOURCES_DIR, "SwiftSyntax")
@@ -464,10 +463,6 @@ def buildProduct(self, product_name: str) -> None:
464463
print("** Building product " + product_name + " **")
465464
self.__build(PACKAGE_DIR, product_name)
466465

467-
def buildExample(self, example_name: str) -> None:
468-
print("** Building example " + example_name + " **")
469-
self.__build(EXAMPLES_DIR, example_name)
470-
471466
def __build(self, package_dir: str, product_name: str) -> None:
472467
command = list(self.__get_swiftpm_invocation(package_dir))
473468
command.extend(["--product", product_name])
@@ -764,8 +759,8 @@ def build_command(args: argparse.Namespace) -> None:
764759
builder.buildProduct("SwiftSyntaxBuilder")
765760

766761
# Build examples
767-
builder.buildExample("AddOneToIntegerLiterals")
768-
builder.buildExample("CodeGenerationUsingSwiftSyntaxBuilder")
762+
builder.buildProduct("AddOneToIntegerLiterals")
763+
builder.buildProduct("CodeGenerationUsingSwiftSyntaxBuilder")
769764
except subprocess.CalledProcessError as e:
770765
fail_for_called_process_error("Building SwiftSyntax failed", e)
771766

0 commit comments

Comments
 (0)