Skip to content

Commit

Permalink
Merge pull request swiftlang#27675 from rintaro/revert-syntaxparse
Browse files Browse the repository at this point in the history
[SyntaxParse] Revert syntax parsing changes from the master branch
  • Loading branch information
rintaro authored Oct 15, 2019
2 parents 3574c51 + 66d19e6 commit f8209f2
Show file tree
Hide file tree
Showing 101 changed files with 3,146 additions and 6,970 deletions.
3 changes: 0 additions & 3 deletions cmake/modules/SwiftHandleGybSources.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -118,13 +118,10 @@ function(handle_gyb_sources dependency_out_var_name sources_var_name arch)
"${SWIFT_SOURCE_DIR}/utils/gyb_syntax_support/AttributeNodes.py"
"${SWIFT_SOURCE_DIR}/utils/gyb_syntax_support/AvailabilityNodes.py"
"${SWIFT_SOURCE_DIR}/utils/gyb_syntax_support/CommonNodes.py"
"${SWIFT_SOURCE_DIR}/utils/gyb_syntax_support/CompletionOnlyNodes.py"
"${SWIFT_SOURCE_DIR}/utils/gyb_syntax_support/DeclNodes.py"
"${SWIFT_SOURCE_DIR}/utils/gyb_syntax_support/ExprNodes.py"
"${SWIFT_SOURCE_DIR}/utils/gyb_syntax_support/GenericNodes.py"
"${SWIFT_SOURCE_DIR}/utils/gyb_syntax_support/NodeSerializationCodes.py"
"${SWIFT_SOURCE_DIR}/utils/gyb_syntax_support/PatternNodes.py"
"${SWIFT_SOURCE_DIR}/utils/gyb_syntax_support/SILOnlyNodes.py"
"${SWIFT_SOURCE_DIR}/utils/gyb_syntax_support/StmtNodes.py"
"${SWIFT_SOURCE_DIR}/utils/gyb_syntax_support/TypeNodes.py"
"${SWIFT_SOURCE_DIR}/utils/gyb_syntax_support/Token.py"
Expand Down
2 changes: 0 additions & 2 deletions include/swift/AST/DiagnosticsParse.def
Original file line number Diff line number Diff line change
Expand Up @@ -970,8 +970,6 @@ ERROR(expected_expr_throw,PointsToFirstBadToken,
// Yield Statment
ERROR(expected_expr_yield,PointsToFirstBadToken,
"expected expression in 'yield' statement", ())
ERROR(unexpected_arg_label_yield,none,
"unexpected argument label in 'yield' statement", ())

// Defer Statement
ERROR(expected_lbrace_after_defer,PointsToFirstBadToken,
Expand Down
261 changes: 0 additions & 261 deletions include/swift/Parse/ASTGen.h

This file was deleted.

10 changes: 2 additions & 8 deletions include/swift/Parse/CodeCompletionCallbacks.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ class CodeCompletionCallbacks {
/// completion. This declaration contained the code completion token.
Decl *ParsedDecl = nullptr;

TypeLoc ParsedTypeLoc;

/// True if code completion is done inside a raw value expression of an enum
/// case.
bool InEnumElementRawValue = false;
Expand Down Expand Up @@ -78,10 +76,6 @@ class CodeCompletionCallbacks {
ParsedDecl = D;
}

void setParsedTypeLoc(TypeLoc TyLoc) {
ParsedTypeLoc = TyLoc;
}

void setLeadingSequenceExprs(ArrayRef<Expr *> exprs) {
leadingSequenceExprs.assign(exprs.begin(), exprs.end());
}
Expand Down Expand Up @@ -165,10 +159,10 @@ class CodeCompletionCallbacks {
virtual void completeTypeSimpleBeginning() {};

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

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

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

0 comments on commit f8209f2

Please sign in to comment.