1 #ifndef STATEMENT_HPP
2 #define STATEMENT_HPP
3 #include <sngcpp/parser/ParserApi.hpp>
4 #include <sngcpp/ast/Statement.hpp>
5 #include <sngcpp/parser/ParsingContext.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 StatementParser
15 {
16 static soulng::parser::Match Statement(CppLexer& lexer, sngcpp::cppparser::ParsingContext* ctx);
17 static soulng::parser::Match LabeledStatement(CppLexer& lexer, sngcpp::cppparser::ParsingContext* ctx);
18 static soulng::parser::Match ExpressionStatement(CppLexer& lexer, sngcpp::cppparser::ParsingContext* ctx);
19 static soulng::parser::Match CompoundStatement(CppLexer& lexer, sngcpp::cppparser::ParsingContext* ctx);
20 static soulng::parser::Match SelectionStatement(CppLexer& lexer, sngcpp::cppparser::ParsingContext* ctx);
21 static soulng::parser::Match IterationStatement(CppLexer& lexer, sngcpp::cppparser::ParsingContext* ctx);
22 static soulng::parser::Match JumpStatement(CppLexer& lexer, sngcpp::cppparser::ParsingContext* ctx);
23 static soulng::parser::Match DeclarationStatement(CppLexer& lexer, sngcpp::cppparser::ParsingContext* ctx);
24 static soulng::parser::Match TryStatement(CppLexer& lexer, sngcpp::cppparser::ParsingContext* ctx);
25 static soulng::parser::Match HandlerSequence(CppLexer& lexer, sngcpp::cppparser::ParsingContext* ctx, sngcpp::ast::TryStatementNode* tryStatementNode);
26 static soulng::parser::Match Handler(CppLexer& lexer, sngcpp::cppparser::ParsingContext* ctx);
27 static soulng::parser::Match Condition(CppLexer& lexer, sngcpp::cppparser::ParsingContext* ctx);
28 static soulng::parser::Match ForRangeDeclaration(CppLexer& lexer, sngcpp::cppparser::ParsingContext* ctx);
29 static soulng::parser::Match ForRangeInitializer(CppLexer& lexer, sngcpp::cppparser::ParsingContext* ctx);
30 static soulng::parser::Match ForInitStatement(CppLexer& lexer, sngcpp::cppparser::ParsingContext* ctx);
31 static soulng::parser::Match ExceptionDeclaration(CppLexer& lexer, sngcpp::cppparser::ParsingContext* ctx);
32 };
33
34 #endif // STATEMENT_HPP