public EmptyAnalysis(IServiceContainer services, IDocument document) { Document = document ?? throw new ArgumentNullException(nameof(document)); GlobalScope = new EmptyGlobalScope(document); Ast = AstUtilities.MakeEmptyAst(document.Uri); ExpressionEvaluator = new ExpressionEval(services, document); }
public EmptyAnalysis(IServiceContainer services, IDocument document) { Document = document ?? throw new ArgumentNullException(nameof(document)); GlobalScope = new EmptyGlobalScope(document); _emptyAst = _emptyAst ?? (_emptyAst = Parser.CreateParser(new StringReader(string.Empty), PythonLanguageVersion.None).ParseFile()); ExpressionEvaluator = new ExpressionEval(services, document, Ast); }
public EmptyAnalysis(IDocument document = null) { Document = document; GlobalScope = new EmptyGlobalScope(document); }