1 #ifndef DECLARATION_HPP
2 #define DECLARATION_HPP
3 #include <sngcpp/parser/ParserApi.hpp>
4 #include <sngcpp/parser/ParsingContext.hpp>
5 #include <sngcpp/ast/Declaration.hpp>
6 #include <soulng/lexer/Token.hpp>
7 #include <soulng/parser/Match.hpp>
8 #include <soulng/parser/Value.hpp>
9
10
11
12 class CppLexer;
13
14 struct DeclarationParser
15 {
16 static soulng::parser::Match Declaration(CppLexer& lexer, sngcpp::cppparser::ParsingContext* ctx);
17 static soulng::parser::Match NamespaceDefinition(CppLexer& lexer, sngcpp::cppparser::ParsingContext* ctx);
18 static soulng::parser::Match NamedNamespaceDefinition(CppLexer& lexer, sngcpp::cppparser::ParsingContext* ctx);
19 static soulng::parser::Match UnnamedNamespaceDefinition(CppLexer& lexer, sngcpp::cppparser::ParsingContext* ctx);
20 static soulng::parser::Match BlockDeclaration(CppLexer& lexer, sngcpp::cppparser::ParsingContext* ctx);
21 static soulng::parser::Match SimpleDeclaration(CppLexer& lexer, sngcpp::cppparser::ParsingContext* ctx);
22 static soulng::parser::Match DeclSpecifiers(CppLexer& lexer);
23 static soulng::parser::Match DeclSpecifier(CppLexer& lexer);
24 static soulng::parser::Match StorageClassSpecifier(CppLexer& lexer);
25 static soulng::parser::Match FunctionSpecifier(CppLexer& lexer);
26 static soulng::parser::Match AliasDeclaration(CppLexer& lexer, sngcpp::cppparser::ParsingContext* ctx);
27 static soulng::parser::Match UsingDirective(CppLexer& lexer, sngcpp::cppparser::ParsingContext* ctx);
28 static soulng::parser::Match UsingDeclaration(CppLexer& lexer, sngcpp::cppparser::ParsingContext* ctx);
29 static soulng::parser::Match TypedefDeclaration(CppLexer& lexer, sngcpp::cppparser::ParsingContext* ctx);
30 static soulng::parser::Match LinkageSpecification(CppLexer& lexer, sngcpp::cppparser::ParsingContext* ctx);
31 };
32
33 #endif // DECLARATION_HPP