mirror of
https://github.com/github/codeql.git
synced 2025-12-17 09:13:20 +01:00
32 lines
836 B
C#
32 lines
836 B
C#
using System.Management.Automation.Language;
|
|
|
|
namespace Semmle.Extraction.PowerShell
|
|
{
|
|
/// <summary>
|
|
/// Represents a parsed PowerShell Script
|
|
/// </summary>
|
|
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; }
|
|
|
|
/// <summary>
|
|
/// The AST of this script
|
|
/// </summary>
|
|
public ScriptBlockAst ParseResult { get; }
|
|
/// <summary>
|
|
/// Where this script came from.
|
|
/// </summary>
|
|
public string Location { get; }
|
|
}
|
|
}
|