Skip to content

Conversation

rintaro
Copy link
Member

@rintaro rintaro commented Nov 21, 2019

The intent of this PR is to expose skipBracedBlock() as a Parser method so that we can use it from other files.

  • Stop inserting \0 in complete-test; Using \0 as a representation of the cursor position is a implementation detail and is done by SourceKit. Client including complete-test should
    not do it. This inserted \0 used to be treated as EOF in the parser so the code
    after the completion position was completely ignored.
  • Stop using skipBracedBlock() in parseDeclPrecedenceGroup(), skipUntilDeclRBrace() is better at this context.
  • Disable SyntaxParsingContext inside skipBracedBlock()
  • Remove unsound recovery logic in consumeAbstractFunctionBody(). This doesn't match with the parser behavior in the delayed parsing.

Using \0 as a representation of the cursor position is a implementation
detail and is done by SourceKit. Client including complete-test should
not do it.

This inserted test used to be treated as EOF in compiler so the code
after the completion position is completely ignored.
- Stop using skipBracedBlock() in parseDeclPrecedenceGroup(),
  skipUntilDeclRBrace() is better at this context.
- Disable 'SyntaxParsingContext' inside skipBracedBlock()
- Removed unsound recovery logic in consumeAbstractFunctionBody(). This
  doesn't match with the parser bahavior in the delayed parsing.
- Expose 'skipBracedBlock()' as a Parser instance method so it's usable
  from other files.
@rintaro
Copy link
Member Author

rintaro commented Nov 21, 2019

@swift-ci Please smoke test

@rintaro rintaro requested a review from benlangmuir November 21, 2019 06:19
@rintaro
Copy link
Member Author

rintaro commented Dec 2, 2019

@swift-ci Please smoke test

@rintaro rintaro merged commit 5c60af3 into swiftlang:master Dec 2, 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