1
2
3
4
5
6 #include <sng2html/sng2html/ParserFile.hpp>
7 #include <sng2html/sng2html/Visitor.hpp>
8
9 namespace sng2html { namespace sng2html {
10
11 Include::Include(bool hppPrefix_, const std::u32string& str_) : hppPrefix(hppPrefix_), str(str_)
12 {
13 }
14
15 ParserFile::ParserFile(const std::string& fileName_) : fileName(fileName_)
16 {
17 }
18
19 void ParserFile::AddInclude(Include* include)
20 {
21 includes.push_back(std::unique_ptr<Include>(include));
22 }
23
24 void ParserFile::AddUsingNamespace(const std::u32string& usingNs)
25 {
26 usingNamespaceDeclarations.push_back(usingNs);
27 }
28
29 void ParserFile::AddParser(GrammarParser* parser)
30 {
31 parsers.push_back(std::unique_ptr<GrammarParser>(parser));
32 }
33
34 void ParserFile::Accept(Visitor& visitor)
35 {
36 visitor.Visit(*this);
37 }
38
39 } }