1 #ifndef TEMPLATE_HPP
2 #define TEMPLATE_HPP
3 #include <sngcpp/parser/ParserApi.hpp>
4 #include <sngcpp/parser/ParsingContext.hpp>
5 #include <sngcpp/ast/Template.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 TemplateParser
15 {
16 static soulng::parser::Match TemplateDeclaration(CppLexer& lexer, sngcpp::cppparser::ParsingContext* ctx);
17 static soulng::parser::Match TemplateParameterList(CppLexer& lexer, sngcpp::cppparser::ParsingContext* ctx);
18 static soulng::parser::Match TemplateParameter(CppLexer& lexer, sngcpp::cppparser::ParsingContext* ctx);
19 static soulng::parser::Match TypeParameter(CppLexer& lexer, sngcpp::cppparser::ParsingContext* ctx);
20 static soulng::parser::Match SimpleTemplateId(CppLexer& lexer, sngcpp::cppparser::ParsingContext* ctx);
21 static soulng::parser::Match TemplateId(CppLexer& lexer, sngcpp::cppparser::ParsingContext* ctx);
22 static soulng::parser::Match TemplateName(CppLexer& lexer);
23 static soulng::parser::Match TemplateArgumentList(CppLexer& lexer, sngcpp::cppparser::ParsingContext* ctx, int* arity);
24 static soulng::parser::Match TemplateArgument(CppLexer& lexer, sngcpp::cppparser::ParsingContext* ctx);
25 static soulng::parser::Match ExplicitInstantiation(CppLexer& lexer, sngcpp::cppparser::ParsingContext* ctx);
26 static soulng::parser::Match ExplicitSpecialization(CppLexer& lexer, sngcpp::cppparser::ParsingContext* ctx);
27 };
28
29 #endif // TEMPLATE_HPP