Ejemplo n.º 1
0
 /// <summary>
 /// 初始化Scanner
 /// </summary>
 /// <param name="writer">错误编写器</param>
 /// <param name="manager">关键字管理器</param>
 public Scanner(ErrorWriter writer, KeywordManager manager)
 {
     m_KeywordManager = manager;
     m_Writer         = writer;
     m_StrBuilder     = new StringBuilder();
 }
Ejemplo n.º 2
0
 /// <summary>
 /// 初始化Compiler
 /// </summary>
 /// <param name="errorWriter"></param>
 /// <param name="keywordManager"></param>
 public Compiler(ErrorWriter errorWriter, KeywordManager keywordManager)
 {
     m_ErrorWriter    = errorWriter ?? throw new ArgumentNullException(nameof(errorWriter));
     m_KeywordManager = keywordManager ?? throw new ArgumentNullException(nameof(keywordManager));
     m_SyncObj        = new object();
 }
Ejemplo n.º 3
0
 /// <summary>
 /// 初始化 Parser
 /// </summary>
 /// <param name="writer">错误编写器</param>
 /// <param name="keywordManager">关键字管理器</param>
 public Parser(ErrorWriter writer, KeywordManager keywordManager)
 {
     m_KeywordManager = keywordManager;
     m_Writer         = writer;
 }