Skip to content

[SyntaxParse] Adjust parseMatchingToken() #27531

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Oct 8, 2019

Conversation

rintaro
Copy link
Member

@rintaro rintaro commented Oct 3, 2019

  • Now returns ParsedSyntaxResult<ParsedTokenSyntax> instead of Optional<ParsedTokenSyntax>.
  • Remove TokLoc parameter because Syntax parsing doesn't need the location.
  • Add silenceDiag parameter flag which prevents diagnostics even if it cannot be parsed.
    This simplifies the client code. For example for:
      var a: (<type A>, <type B>
    If parsing <type B> ends up with an error, we do still want to parse ), but we don't want to emit missing ')' error even if it's missing.

@rintaro rintaro requested a review from nathawes October 3, 2019 20:55
@rintaro
Copy link
Member Author

rintaro commented Oct 3, 2019

@nathawes This affects your #27460 .

@rintaro
Copy link
Member Author

rintaro commented Oct 3, 2019

@swift-ci Please smoke test

@rintaro rintaro force-pushed the syntaxparse-matchingtoken branch from 01a054c to 9f26b56 Compare October 3, 2019 21:53
@rintaro
Copy link
Member Author

rintaro commented Oct 3, 2019

@swift-ci Please smoke test

@rintaro
Copy link
Member Author

rintaro commented Oct 4, 2019

@swift-ci Please smoke test Linux

2 similar comments
@rintaro
Copy link
Member Author

rintaro commented Oct 4, 2019

@swift-ci Please smoke test Linux

@rintaro
Copy link
Member Author

rintaro commented Oct 7, 2019

@swift-ci Please smoke test Linux

@rintaro rintaro merged commit 2035658 into swiftlang:master Oct 8, 2019
rintaro added a commit to rintaro/swift that referenced this pull request Oct 14, 2019
…atchingtoken"

This reverts commit 2035658, reversing
changes made to 18f2b97.
rintaro added a commit to rintaro/swift that referenced this pull request Oct 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants