/// <summary> /// 增加语法树 /// </summary> /// <param name="node">语法树</param> /// <returns></returns> public CompilationException Add(SyntaxTree node) { var info = SyntaxInfos.Add(node); CompileException.ErrorFlag = info.ErrorFlag; return(info); }
/// <summary> /// 使用构建模板 /// </summary> /// <param name="template">构建模板</param> /// <returns></returns> public CompilationException Add(IScript template) { var info = SyntaxInfos.Add(template.Script, template.Usings); CompileException.ErrorFlag = info.ErrorFlag; return(info); }
/// <summary> /// 添加一段代码 /// </summary> /// <param name="text">代码</param> /// <returns></returns> public CompilationException Add(string text) { var info = SyntaxInfos.Add(text); CompileException.ErrorFlag = info.ErrorFlag; return(info); }