Skip to content

Commit e1a52d6

Browse files
authored
Merge pull request #103 from nkcsgexi/group-info
Build: add group information for IDE's interface rendering.
2 parents 7be7157 + 8e75b0b commit e1a52d6

File tree

2 files changed

+48
-0
lines changed

2 files changed

+48
-0
lines changed

build-script.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
WORKSPACE_DIR + '/swift/utils/incrparse/incr_transfer_round_trip.py'
1818
GYB_EXEC = WORKSPACE_DIR + '/swift/utils/gyb'
1919
LIT_EXEC = WORKSPACE_DIR + '/llvm/utils/lit/lit.py'
20+
GROUP_INFO_PATH = PACKAGE_DIR + '/utils/group.json'
2021

2122
### Generate Xcode project
2223

@@ -184,6 +185,11 @@ def get_swiftpm_invocation(spm_exec, build_dir, parser_header_dir,
184185

185186
# To speed up compilation.
186187
swiftpm_call.extend(['-Xswiftc', '-enforce-exclusivity=unchecked'])
188+
189+
# To build the group information into the module documentation file
190+
swiftpm_call.extend(['-Xswiftc', '-Xfrontend', '-Xswiftc', '-group-info-path'])
191+
swiftpm_call.extend(['-Xswiftc', '-Xfrontend', '-Xswiftc', GROUP_INFO_PATH])
192+
187193
return swiftpm_call
188194

189195
def build_swiftsyntax(swift_build_exec, swiftc_exec, build_dir,

utils/group.json

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
{
2+
"SyntaxNodes": [
3+
"SyntaxData.swift",
4+
"TokenKind.swift",
5+
"Syntax.swift",
6+
"Trivia.swift",
7+
"RawSyntax.swift",
8+
"SyntaxKind.swift",
9+
"SyntaxNodes.swift",
10+
"SyntaxCollections.swift",
11+
"SourcePresence.swift",
12+
"SyntaxChildren.swift",
13+
],
14+
"Utils": [
15+
"SyntaxBuilders.swift",
16+
"SyntaxFactory.swift",
17+
"SyntaxRewriter.swift",
18+
"SyntaxClassifier.swift",
19+
"SyntaxClassification.swift",
20+
],
21+
"Diagnostic": [
22+
"DiagnosticConsumer.swift",
23+
"JSONDiagnosticConsumer.swift",
24+
"PrintingDiagnosticConsumer.swift",
25+
"DiagnosticEngine.swift",
26+
"Diagnostic.swift",
27+
"SyntaxVerifier.swift",
28+
],
29+
"Position": [
30+
"AbsolutePosition.swift",
31+
"Utils.swift",
32+
"SourceLocation.swift",
33+
"SourceLength.swift",
34+
],
35+
"Parse": [
36+
"SyntaxParser.swift",
37+
"IncrementalParseTransition.swift",
38+
],
39+
"Internal": [
40+
"AtomicCounter.swift",
41+
]
42+
}

0 commit comments

Comments
 (0)