1 #ifndef CLASS_HPP
2 #define CLASS_HPP
3 #include <sngcpp/parser/ParserApi.hpp>
4 #include <sngcpp/parser/ParsingContext.hpp>
5 #include <sngcpp/ast/Class.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 ClassParser
15 {
16 static soulng::parser::Match ClassDeclaration(CppLexer& lexer, sngcpp::cppparser::ParsingContext* ctx);
17 static soulng::parser::Match ClassSpecifier(CppLexer& lexer, sngcpp::cppparser::ParsingContext* ctx);
18 static soulng::parser::Match MemberSpecifications(CppLexer& lexer, sngcpp::cppparser::ParsingContext* ctx, sngcpp::ast::ClassNode* classNode);
19 static soulng::parser::Match MemberSpecification(CppLexer& lexer, sngcpp::cppparser::ParsingContext* ctx, sngcpp::ast::ClassNode* classNode);
20 static soulng::parser::Match MemberDeclaration(CppLexer& lexer, sngcpp::cppparser::ParsingContext* ctx);
21 static soulng::parser::Match SpecialMemberFunctionDeclaration(CppLexer& lexer, sngcpp::cppparser::ParsingContext* ctx);
22 static soulng::parser::Match ClassHead(CppLexer& lexer, sngcpp::cppparser::ParsingContext* ctx);
23 static soulng::parser::Match ForwardClassDeclaration(CppLexer& lexer, sngcpp::cppparser::ParsingContext* ctx);
24 static soulng::parser::Match ClassKey(CppLexer& lexer);
25 static soulng::parser::Match ClassName(CppLexer& lexer, sngcpp::cppparser::ParsingContext* ctx);
26 static soulng::parser::Match ClassVirtSpecifiers(CppLexer& lexer);
27 static soulng::parser::Match ClassVirtSpecifier(CppLexer& lexer);
28 static soulng::parser::Match BaseClause(CppLexer& lexer, sngcpp::cppparser::ParsingContext* ctx);
29 static soulng::parser::Match BaseClassSpecifierList(CppLexer& lexer, sngcpp::cppparser::ParsingContext* ctx);
30 static soulng::parser::Match BaseClassSpecifier(CppLexer& lexer, sngcpp::cppparser::ParsingContext* ctx);
31 static soulng::parser::Match BaseSpecifiers(CppLexer& lexer);
32 static soulng::parser::Match BaseSpecifier(CppLexer& lexer);
33 static soulng::parser::Match AccessSpecifier(CppLexer& lexer);
34 static soulng::parser::Match VirtPureSpecifiers(CppLexer& lexer, bool functionMember);
35 static soulng::parser::Match VirtSpecifier(CppLexer& lexer, bool functionMember);
36 static soulng::parser::Match PureSpecifier(CppLexer& lexer, bool functionMember);
37 static soulng::parser::Match SpecialMemberFunctionDefinition(CppLexer& lexer, sngcpp::cppparser::ParsingContext* ctx);
38 static soulng::parser::Match CtorInitializer(CppLexer& lexer, sngcpp::cppparser::ParsingContext* ctx);
39 static soulng::parser::Match MemberInitializerList(CppLexer& lexer, sngcpp::cppparser::ParsingContext* ctx);
40 static soulng::parser::Match MemberInitializer(CppLexer& lexer, sngcpp::cppparser::ParsingContext* ctx);
41 static soulng::parser::Match MemberInitializerId(CppLexer& lexer, sngcpp::cppparser::ParsingContext* ctx);
42 };
43
44 #endif // CLASS_HPP