Skip to content

Commit

Permalink
[Parse] Factor out declaration modifier list parsing (#15702)
Browse files Browse the repository at this point in the history
  • Loading branch information
rintaro committed Apr 3, 2018
1 parent 7e5f8b2 commit 18b28b9
Show file tree
Hide file tree
Showing 6 changed files with 330 additions and 302 deletions.
7 changes: 5 additions & 2 deletions include/swift/Parse/Parser.h
Original file line number Diff line number Diff line change
Expand Up @@ -768,6 +768,10 @@ class Parser {
bool parseDeclAttributeList(DeclAttributes &Attributes,
bool &FoundCodeCompletionToken);

/// Parse the optional modifiers before a declaration.
bool parseDeclModifierList(DeclAttributes &Attributes, SourceLoc &StaticLoc,
StaticSpellingKind &StaticSpelling);

/// Parse the @_specialize attribute.
/// \p closingBrace is the expected closing brace, which can be either ) or ]
/// \p Attr is where to store the parsed attribute
Expand Down Expand Up @@ -828,8 +832,7 @@ class Parser {
ParserResult<StructDecl>
parseDeclStruct(ParseDeclOptions Flags, DeclAttributes &Attributes);
ParserResult<ClassDecl>
parseDeclClass(SourceLoc ClassLoc,
ParseDeclOptions Flags, DeclAttributes &Attributes);
parseDeclClass(ParseDeclOptions Flags, DeclAttributes &Attributes);
ParserResult<PatternBindingDecl>
parseDeclVar(ParseDeclOptions Flags, DeclAttributes &Attributes,
SmallVectorImpl<Decl *> &Decls,
Expand Down

0 comments on commit 18b28b9

Please sign in to comment.