File tree Expand file tree Collapse file tree 8 files changed +492
-488
lines changed Expand file tree Collapse file tree 8 files changed +492
-488
lines changed Original file line number Diff line number Diff line change 7
7
} %
8
8
//// Automatically Generated From SyntaxNodes.swift.gyb.
9
9
//// Do Not Edit Directly!
10
- //===------------ SyntaxNodes .swift - Syntax Node definitions ---- ---------===//
10
+ //===---------- Misc .swift - Miscelaneous SwiftSyntax definitions ---------===//
11
11
//
12
12
// This source file is part of the Swift.org open source project
13
13
//
@@ -39,6 +39,23 @@ extension SyntaxNode {
39
39
% end
40
40
}
41
41
42
+ public extension Syntax {
43
+ /// Retrieve the concretely typed node that this Syntax node wraps.
44
+ /// This property is exposed for testing purposes only.
45
+ var _asConcreteType : Any {
46
+ switch self . asSyntaxEnum {
47
+ case . token( let node) :
48
+ return node
49
+ case . unknown( let node) :
50
+ return node
51
+ % for node in SYNTAX_NODES:
52
+ case . ${ node. swift_syntax_kind} ( let node) :
53
+ return node
54
+ % end
55
+ }
56
+ }
57
+ }
58
+
42
59
extension SyntaxParser {
43
60
static func verifyNodeDeclarationHash( ) -> Bool {
44
61
return String ( cString: swiftparse_syntax_structure_versioning_identifier ( ) !) ==
Original file line number Diff line number Diff line change 7
7
} %
8
8
//// Automatically Generated From SyntaxNodes.swift.gyb.
9
9
//// Do Not Edit Directly!
10
- //===------------ SyntaxNodes .swift - Syntax Node definitions -- -----------===//
10
+ //===---------- SyntaxBaseNodes .swift - Syntax Node definitions -----------===//
11
11
//
12
12
// This source file is part of the Swift.org open source project
13
13
//
14
- // Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
14
+ // Copyright (c) 2014 - 2019 Apple Inc. and the Swift project authors
15
15
// Licensed under Apache License v2.0 with Runtime Library Exception
16
16
//
17
17
// See https://swift.org/LICENSE.txt for license information
Original file line number Diff line number Diff line change 7
7
} %
8
8
//// Automatically Generated From SyntaxNodes.swift.gyb.
9
9
//// Do Not Edit Directly!
10
- //===------------ SyntaxNodes .swift - Syntax Node definitions -------- -----===//
10
+ //===--- SyntaxEnum .swift - Enum for exhaustive Syntax node switching -----===//
11
11
//
12
12
// This source file is part of the Swift.org open source project
13
13
//
@@ -47,21 +47,6 @@ public extension Syntax {
47
47
% else :
48
48
return . ${ node. swift_syntax_kind} ( ${ node. name} ( self ) !)
49
49
% end
50
- % end
51
- }
52
- }
53
-
54
- /// Retrieve the concretely typed node that this Syntax node wraps.
55
- /// This property is exposed for testing purposes only.
56
- var _asConcreteType : Any {
57
- switch self . asSyntaxEnum {
58
- case . token( let node) :
59
- return node
60
- case . unknown( let node) :
61
- return node
62
- % for node in SYNTAX_NODES:
63
- case . ${ node. swift_syntax_kind} ( let node) :
64
- return node
65
50
% end
66
51
}
67
52
}
Original file line number Diff line number Diff line change 7
7
} %
8
8
//// Automatically Generated From SyntaxNodes.swift.gyb.
9
9
//// Do Not Edit Directly!
10
- //===------------ SyntaxNodes .swift - Syntax Node definitions -------------===//
10
+ //===----------- SyntaxTraits .swift - Traits for syntax nodes -------------===//
11
11
//
12
12
// This source file is part of the Swift.org open source project
13
13
//
You can’t perform that action at this time.
0 commit comments