using System.Management.Automation.Language; namespace Semmle.Extraction.PowerShell { /// /// Represents a parsed PowerShell Script /// public class CompiledScript { public CompiledScript(string path, ScriptBlockAst compilation, Token[] tokens, ParseError[] errors) { Location = path; ParseResult = compilation; Tokens = tokens; ParseErrors = errors; } public ParseError[] ParseErrors { get; set; } public Token[] Tokens { get; set; } /// /// The AST of this script /// public ScriptBlockAst ParseResult { get; } /// /// Where this script came from. /// public string Location { get; } } }