Skip to content

Commit 70a13ef

Browse files
committed
Adopt new SwiftCompilerSupport header and enumerator names.
1 parent c654ada commit 70a13ef

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

include/swift/Basic/Features.def

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,10 @@ EXPERIMENTAL_FEATURE(ParserRoundTrip)
134134
/// Swift parser.
135135
EXPERIMENTAL_FEATURE(ParserValidation)
136136

137+
/// Whether to fold sequence expressions in the syntax tree produced by the
138+
/// Swift Swift parser.
139+
EXPERIMENTAL_FEATURE(ParserSequenceFolding)
140+
137141
#undef EXPERIMENTAL_FEATURE
138142
#undef UPCOMING_FEATURE
139143
#undef SUPPRESSIBLE_LANGUAGE_FEATURE

lib/Parse/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ if (SWIFT_SWIFT_PARSER)
5757

5858
target_include_directories(swiftParse
5959
PRIVATE
60-
${CMAKE_CURRENT_SOURCE_DIR}/../../../swift-syntax/Sources/SwiftParser
60+
${CMAKE_CURRENT_SOURCE_DIR}/../../../swift-syntax/Sources/SwiftCompilerSupport
6161
)
6262

6363
target_compile_definitions(swiftParse

lib/Parse/ParseRequests.cpp

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
#include "swift/SyntaxParse/SyntaxTreeCreator.h"
2828

2929
#ifdef SWIFT_SWIFT_PARSER
30-
#include "SwiftParserCompilerSupport.h"
30+
#include "SwiftCompilerSupport.h"
3131
#endif
3232

3333
using namespace swift;
@@ -202,11 +202,14 @@ SourceFileParsingResult ParseSourceFileRequest::evaluate(Evaluator &evaluator,
202202
unsigned int flags = 0;
203203

204204
if (ctx.LangOpts.hasFeature(Feature::ParserRoundTrip))
205-
flags |= SPCC_RoundTrip;
205+
flags |= SCC_RoundTrip;
206206

207207
if (!ctx.Diags.hadAnyError() &&
208208
ctx.LangOpts.hasFeature(Feature::ParserValidation))
209-
flags |= SPCC_ParseDiagnostics;
209+
flags |= SCC_ParseDiagnostics;
210+
211+
if (ctx.LangOpts.hasFeature(Feature::ParserSequenceFolding))
212+
flags |= SCC_FoldSequences;
210213

211214
int roundTripResult =
212215
swift_parser_consistencyCheck(

0 commit comments

Comments
 (0)