Freigeben über


Parser.ParseFile(String, Token[], ParseError[]) Method

Definition

Parse input from the specified file.

public:
 static System::Management::Automation::Language::ScriptBlockAst ^ ParseFile(System::String ^ fileName, [Runtime::InteropServices::Out] cli::array <System::Management::Automation::Language::Token ^> ^ % tokens, [Runtime::InteropServices::Out] cli::array <System::Management::Automation::Language::ParseError ^> ^ % errors);
public static System.Management.Automation.Language.ScriptBlockAst ParseFile (string fileName, out System.Management.Automation.Language.Token[] tokens, out System.Management.Automation.Language.ParseError[] errors);
static member ParseFile : string * Token[] * ParseError[] -> System.Management.Automation.Language.ScriptBlockAst
Public Shared Function ParseFile (fileName As String, ByRef tokens As Token(), ByRef errors As ParseError()) As ScriptBlockAst

Parameters

fileName
String

The name of the file to parse.

tokens
Token[]

Returns the tokens from parsing the script.

errors
ParseError[]

Returns errors, if any, discovered while parsing the script.

Returns

The ScriptBlockAst that represents the input script file.

Applies to