Skip to content

Commit f8209f2

Browse files
authored
Merge pull request #27675 from rintaro/revert-syntaxparse
[SyntaxParse] Revert syntax parsing changes from the master branch
2 parents 3574c51 + 66d19e6 commit f8209f2

File tree

101 files changed

+3146
-6970
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

101 files changed

+3146
-6970
lines changed

cmake/modules/SwiftHandleGybSources.cmake

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,13 +118,10 @@ function(handle_gyb_sources dependency_out_var_name sources_var_name arch)
118118
"${SWIFT_SOURCE_DIR}/utils/gyb_syntax_support/AttributeNodes.py"
119119
"${SWIFT_SOURCE_DIR}/utils/gyb_syntax_support/AvailabilityNodes.py"
120120
"${SWIFT_SOURCE_DIR}/utils/gyb_syntax_support/CommonNodes.py"
121-
"${SWIFT_SOURCE_DIR}/utils/gyb_syntax_support/CompletionOnlyNodes.py"
122121
"${SWIFT_SOURCE_DIR}/utils/gyb_syntax_support/DeclNodes.py"
123122
"${SWIFT_SOURCE_DIR}/utils/gyb_syntax_support/ExprNodes.py"
124123
"${SWIFT_SOURCE_DIR}/utils/gyb_syntax_support/GenericNodes.py"
125-
"${SWIFT_SOURCE_DIR}/utils/gyb_syntax_support/NodeSerializationCodes.py"
126124
"${SWIFT_SOURCE_DIR}/utils/gyb_syntax_support/PatternNodes.py"
127-
"${SWIFT_SOURCE_DIR}/utils/gyb_syntax_support/SILOnlyNodes.py"
128125
"${SWIFT_SOURCE_DIR}/utils/gyb_syntax_support/StmtNodes.py"
129126
"${SWIFT_SOURCE_DIR}/utils/gyb_syntax_support/TypeNodes.py"
130127
"${SWIFT_SOURCE_DIR}/utils/gyb_syntax_support/Token.py"

include/swift/AST/DiagnosticsParse.def

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -970,8 +970,6 @@ ERROR(expected_expr_throw,PointsToFirstBadToken,
970970
// Yield Statment
971971
ERROR(expected_expr_yield,PointsToFirstBadToken,
972972
"expected expression in 'yield' statement", ())
973-
ERROR(unexpected_arg_label_yield,none,
974-
"unexpected argument label in 'yield' statement", ())
975973

976974
// Defer Statement
977975
ERROR(expected_lbrace_after_defer,PointsToFirstBadToken,

include/swift/Parse/ASTGen.h

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

include/swift/Parse/CodeCompletionCallbacks.h

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,6 @@ class CodeCompletionCallbacks {
4040
/// completion. This declaration contained the code completion token.
4141
Decl *ParsedDecl = nullptr;
4242

43-
TypeLoc ParsedTypeLoc;
44-
4543
/// True if code completion is done inside a raw value expression of an enum
4644
/// case.
4745
bool InEnumElementRawValue = false;
@@ -78,10 +76,6 @@ class CodeCompletionCallbacks {
7876
ParsedDecl = D;
7977
}
8078

81-
void setParsedTypeLoc(TypeLoc TyLoc) {
82-
ParsedTypeLoc = TyLoc;
83-
}
84-
8579
void setLeadingSequenceExprs(ArrayRef<Expr *> exprs) {
8680
leadingSequenceExprs.assign(exprs.begin(), exprs.end());
8781
}
@@ -165,10 +159,10 @@ class CodeCompletionCallbacks {
165159
virtual void completeTypeSimpleBeginning() {};
166160

167161
/// Complete a given type-identifier after we have consumed the dot.
168-
virtual void completeTypeIdentifierWithDot() {};
162+
virtual void completeTypeIdentifierWithDot(IdentTypeRepr *ITR) {};
169163

170164
/// Complete a given type-identifier when there is no trailing dot.
171-
virtual void completeTypeIdentifierWithoutDot() {};
165+
virtual void completeTypeIdentifierWithoutDot(IdentTypeRepr *ITR) {};
172166

173167
/// Complete the beginning of a case statement at the top of switch stmt.
174168
virtual void completeCaseStmtKeyword() {};

0 commit comments

Comments
 (0)