Прочитај на енглеском

Делите путем


PSParser Class

Definition

PSParser class.

C++
public ref class PSParser sealed
Inheritance
PSParser

Remarks

This is a class providing the interface for parsing a script into a collection of tokens, which primarily can be used for syntax colorization.

Classes provided for syntax colorization includes,

1. PSParser: this class provides the main interface to be used. 2. PSToken: this class provides a public representation of powershell tokens. 3. PSParseError: this class provides a public representation of syntax errors.

These three classes are provided for exposing interfaces only. They should not be used in PowerShell engine code.

Methods

Tokenize(Object[], Collection<PSParseError>)

Parse a script into a collection of tokens.

Tokenize(String, Collection<PSParseError>)

Parse a script into a collection of tokens.

Applies to

Производ Верзије
PowerShell SDK 7.2.0, 7.3.0, 7.4.0
Windows PowerShell 5.1.0.0