Skip to content

Commit 18b28b9

Browse files
authored
[Parse] Factor out declaration modifier list parsing (#15702)
1 parent 7e5f8b2 commit 18b28b9

File tree

6 files changed

+330
-302
lines changed

6 files changed

+330
-302
lines changed

include/swift/Parse/Parser.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -768,6 +768,10 @@ class Parser {
768768
bool parseDeclAttributeList(DeclAttributes &Attributes,
769769
bool &FoundCodeCompletionToken);
770770

771+
/// Parse the optional modifiers before a declaration.
772+
bool parseDeclModifierList(DeclAttributes &Attributes, SourceLoc &StaticLoc,
773+
StaticSpellingKind &StaticSpelling);
774+
771775
/// Parse the @_specialize attribute.
772776
/// \p closingBrace is the expected closing brace, which can be either ) or ]
773777
/// \p Attr is where to store the parsed attribute
@@ -828,8 +832,7 @@ class Parser {
828832
ParserResult<StructDecl>
829833
parseDeclStruct(ParseDeclOptions Flags, DeclAttributes &Attributes);
830834
ParserResult<ClassDecl>
831-
parseDeclClass(SourceLoc ClassLoc,
832-
ParseDeclOptions Flags, DeclAttributes &Attributes);
835+
parseDeclClass(ParseDeclOptions Flags, DeclAttributes &Attributes);
833836
ParserResult<PatternBindingDecl>
834837
parseDeclVar(ParseDeclOptions Flags, DeclAttributes &Attributes,
835838
SmallVectorImpl<Decl *> &Decls,

0 commit comments

Comments
 (0)