swift-syntax icon indicating copy to clipboard operation
swift-syntax copied to clipboard

[SwiftParser] Support function body and type member skipping

Open rintaro opened this issue 1 year ago • 0 comments

  • Introduce ParsingOptions option-set type with bodySkipping member, and add options: ParsingOptions to all Parser.parse(...) functions
  • Skipped body is represented as a newly introduced SkippedDeclSyntax
    • SkippedDeclSyntax contains only one .unknown token that covers the whole skipped characters including trivia.
  • Function body can be skipped as long as:
    • it does not contain nested type decls
  • Type member block can be skipped as long as:
    • it does not contain nested class decls
    • it does not contain operator functions
    • it does not contain #if directives

rintaro avatar Oct 29 '23 05:10 rintaro