Skip to content
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This source file is part of the Swift.org open source project
#
# Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
# Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
# Licensed under Apache License v2.0 with Runtime Library Exception
#
# See http://swift.org/LICENSE.txt for license information
Expand Down
2 changes: 1 addition & 1 deletion CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@

The code of conduct for this project can be found at https://swift.org/code-of-conduct.

<!-- Copyright (c) 2022 Apple Inc and the Swift Project authors. All Rights Reserved. -->
<!-- Copyright (c) 2023 Apple Inc and the Swift Project authors. All Rights Reserved. -->
4 changes: 2 additions & 2 deletions CodeGeneration/Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ let package = Package(
.executable(name: "generate-swiftsyntax", targets: ["generate-swiftsyntax"])
],
dependencies: [
.package(url: "https://github.com/apple/swift-syntax.git", revision: "d73b60bb61a394c85d7a3c739b034e65a11032e6"),
.package(url: "https://github.com/apple/swift-argument-parser.git", .upToNextMinor(from: "1.1.4")),
.package(url: "https://github.com/apple/swift-syntax.git", revision: "cf413a6fe9a82e3f8e1c022cac6f6d23dfb1a035"),
.package(url: "https://github.com/apple/swift-argument-parser.git", .upToNextMinor(from: "1.2.2")),
],
targets: [
.executableTarget(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
Expand All @@ -19,7 +19,7 @@
//===----------------------------------------------------------------------===//

public let ATTRIBUTE_NODES: [Node] = [
% for node in ATTRIBUTE_NODES:
% for node in sorted(ATTRIBUTE_NODES, key=lambda x: x.name):
${make_swift_node(node)},

% end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
Expand All @@ -19,7 +19,7 @@
//===----------------------------------------------------------------------===//

public let AVAILABILITY_NODES: [Node] = [
% for node in AVAILABILITY_NODES:
% for node in sorted(AVAILABILITY_NODES, key=lambda x: x.name):
${make_swift_node(node)},

% end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
Expand Down
2 changes: 1 addition & 1 deletion CodeGeneration/Sources/SyntaxSupport/Child.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
Expand Down Expand Up @@ -52,7 +52,7 @@ public class ChildClassification {


public let SYNTAX_CLASSIFICATIONS: [SyntaxClassification] = [
% for syntaxClassification in SYNTAX_CLASSIFICATIONS:
% for syntaxClassification in sorted(SYNTAX_CLASSIFICATIONS, key=lambda x: x.name):
SyntaxClassification(name: "${syntaxClassification.name}", description: "${syntaxClassification.description.strip()}"),
% end
]
Expand Down
4 changes: 2 additions & 2 deletions CodeGeneration/Sources/SyntaxSupport/CommonNodes.swift.gyb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
Expand All @@ -19,7 +19,7 @@
//===----------------------------------------------------------------------===//

public let COMMON_NODES: [Node] = [
% for node in COMMON_NODES:
% for node in sorted(COMMON_NODES, key=lambda x: x.name):
${make_swift_node(node)},

% end
Expand Down
4 changes: 2 additions & 2 deletions CodeGeneration/Sources/SyntaxSupport/DeclNodes.swift.gyb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
Expand All @@ -19,7 +19,7 @@
//===----------------------------------------------------------------------===//

public let DECL_NODES: [Node] = [
% for node in DECL_NODES:
% for node in sorted(DECL_NODES, key=lambda x: x.name):
${make_swift_node(node)},

% end
Expand Down
4 changes: 2 additions & 2 deletions CodeGeneration/Sources/SyntaxSupport/ExprNodes.swift.gyb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
Expand All @@ -19,7 +19,7 @@
//===----------------------------------------------------------------------===//

public let EXPR_NODES: [Node] = [
% for node in EXPR_NODES:
% for node in sorted(EXPR_NODES, key=lambda x: x.name):
${make_swift_node(node)},

% end
Expand Down
4 changes: 2 additions & 2 deletions CodeGeneration/Sources/SyntaxSupport/GenericNodes.swift.gyb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
Expand All @@ -19,7 +19,7 @@
//===----------------------------------------------------------------------===//

public let GENERIC_NODES: [Node] = [
% for node in GENERIC_NODES:
% for node in sorted(GENERIC_NODES, key=lambda x: x.name):
${make_swift_node(node)},

% end
Expand Down
2 changes: 1 addition & 1 deletion CodeGeneration/Sources/SyntaxSupport/KeywordSpec.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
Expand Down
2 changes: 1 addition & 1 deletion CodeGeneration/Sources/SyntaxSupport/Node.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
Expand Down
4 changes: 2 additions & 2 deletions CodeGeneration/Sources/SyntaxSupport/PatternNodes.swift.gyb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
Expand All @@ -19,7 +19,7 @@
//===----------------------------------------------------------------------===//

public let PATTERN_NODES: [Node] = [
% for node in PATTERN_NODES:
% for node in sorted(PATTERN_NODES, key=lambda x: x.name):
${make_swift_node(node)},

% end
Expand Down
4 changes: 2 additions & 2 deletions CodeGeneration/Sources/SyntaxSupport/StmtNodes.swift.gyb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
Expand All @@ -19,7 +19,7 @@
//===----------------------------------------------------------------------===//

public let STMT_NODES: [Node] = [
% for node in STMT_NODES:
% for node in sorted(STMT_NODES, key=lambda x: x.name):
${make_swift_node(node)},

% end
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
Expand Down
2 changes: 1 addition & 1 deletion CodeGeneration/Sources/SyntaxSupport/SyntaxNodes.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
Expand Down
4 changes: 2 additions & 2 deletions CodeGeneration/Sources/SyntaxSupport/TokenSpec.swift.gyb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
Expand Down Expand Up @@ -175,7 +175,7 @@ public class LiteralSpec: TokenSpec { }
public class MiscSpec: TokenSpec { }

public let SYNTAX_TOKENS: [TokenSpec] = [
% for token in SYNTAX_TOKENS:
% for token in sorted(SYNTAX_TOKENS, key=lambda x: x.name):
% class_name = type(token).__name__
% classification = "classification: \"%s\"" % token.classification.name if token.classification.name not in ['None', 'Keyword', 'ObjectLiteral', 'PoundDirectiveKeyword'] or class_name == 'Misc' and token.classification.name != 'None' else None
% parameters = ["name: \"%s\"" % token.name]
Expand Down
4 changes: 2 additions & 2 deletions CodeGeneration/Sources/SyntaxSupport/Traits.swift.gyb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
Expand All @@ -31,7 +31,7 @@ public class Trait {
}

public let TRAITS: [Trait] = [
% for trait in TRAITS:
% for trait in sorted(TRAITS, key=lambda x: x.trait_name):
Trait(traitName: "${trait.trait_name}",
children: [
% for child in trait.children:
Expand Down
4 changes: 2 additions & 2 deletions CodeGeneration/Sources/SyntaxSupport/Trivia.swift.gyb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
Expand Down Expand Up @@ -66,7 +66,7 @@ public class Trivia {
}

public let TRIVIAS: [Trivia] = [
% for trivia in TRIVIAS:
% for trivia in sorted(TRIVIAS, key=lambda x: x.name):
% parameters = [
% 'name: "%s"' % trivia.name,
% 'comment: #"%s"#' % trivia.comment,
Expand Down
4 changes: 2 additions & 2 deletions CodeGeneration/Sources/SyntaxSupport/TypeNodes.swift.gyb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
Expand All @@ -19,7 +19,7 @@
//===----------------------------------------------------------------------===//

public let TYPE_NODES: [Node] = [
% for node in TYPE_NODES:
% for node in sorted(TYPE_NODES, key=lambda x: x.name):
${make_swift_node(node)},

% end
Expand Down
2 changes: 1 addition & 1 deletion CodeGeneration/Sources/SyntaxSupport/Utils.swift
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2022 Apple Inc. and the Swift project authors
// Copyright (c) 2014 - 2023 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
Expand Down
Loading