1 using System;
2 using System.Collections;
3
4 namespace soulcm.scm2html
5 {
6 public class ParserFile
7 {
8 public ParserFile(const string& fileName_) :
9 fileName(fileName_)
10 {
11 }
12 public const string& FileName() const
13 {
14 return fileName;
15 }
16 public const List<UniquePtr<Cm.Ast.Node>>& UsingDirectives() const
17 {
18 return usingDirectives;
19 }
20 public const List<UniquePtr<GrammarParser>>& Parsers() const
21 {
22 return parsers;
23 }
24 public void AddUsingDirective(Cm.Ast.Node* usingDirective)
25 {
26 usingDirectives.Add(UniquePtr<Cm.Ast.Node>(usingDirective));
27 }
28 public void AddParser(GrammarParser* parser)
29 {
30 parsers.Add(UniquePtr<GrammarParser>(parser));
31 }
32 public void Accept(Visitor& visitor)
33 {
34 visitor.Visit(*this);
35 }
36 private string fileName;
37 private List<UniquePtr<Cm.Ast.Node>> usingDirectives;
38 private List<UniquePtr<GrammarParser>> parsers;
39 }
40 }