Skip to content

[SyntaxParse] Refactor parsing facilities #27046

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 7 commits into from
Sep 11, 2019

Conversation

rintaro
Copy link
Member

@rintaro rintaro commented Sep 5, 2019

  • Add ignoreToken() to skip tokens while keeping them in result syntax tree. When a token is skipped, it become a part of leading trivia of the next token.
  • Simplify syntax parsing result facilities. Now SyntaxParsedResult holds only ParsedRawSyntaxNode and ParserStatus
  • Remove ASTGen::advanceLocEnd() function
  • Remove unused SyntaxParserResult type
  • Remove recovery logic for TypeName[] type from ASTGen. Now parseTypeArray() construct ArrayTypeSyntax with missing/ignored tokens.

@rintaro rintaro changed the title Syntaxparse refactor type [SyntaxParse] Refactor parsing facilities Sep 5, 2019
@rintaro
Copy link
Member Author

rintaro commented Sep 5, 2019

@swift-ci Please smoke test

@rintaro rintaro force-pushed the syntaxparse-refactor-type branch 2 times, most recently from 5bc080b to cf9a2e9 Compare September 6, 2019 01:08
@rintaro
Copy link
Member Author

rintaro commented Sep 6, 2019

@swift-ci Please smoke test

@rintaro
Copy link
Member Author

rintaro commented Sep 6, 2019

@swift-ci Please smoke test Linux

- Utilize ignoreToken() to skip tokens while keeping them in syntax tree
- SyntaxParsedResult now holds ParsedRawSyntaxNode and ParserStatus
- Simplify migration support for 'TypeName[]' type
- Use builder for generic argument clause parsing
@rintaro
Copy link
Member Author

rintaro commented Sep 10, 2019

@swift-ci Please smoke test

@rintaro rintaro force-pushed the syntaxparse-refactor-type branch from cf9a2e9 to 4a3a95b Compare September 11, 2019 00:27
@rintaro rintaro marked this pull request as ready for review September 11, 2019 00:43
@rintaro
Copy link
Member Author

rintaro commented Sep 11, 2019

@swift-ci Please smoke test

@rintaro rintaro merged commit a7d6612 into swiftlang:master Sep 11, 2019
rintaro added a commit to rintaro/swift that referenced this pull request Oct 14, 2019
…efactor-type"

This reverts commit a7d6612, reversing
changes made to 111fb37.
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.

1 participant