PSParser PSParser PSParser Class

Definition

PSParser class

public sealed class PSParser
type PSParser = class
Public NotInheritable Class PSParser
Inheritance
PSParserPSParserPSParser

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>) Tokenize(Object[], Collection<PSParseError>) Tokenize(Object[], Collection<PSParseError>)

Parse a script into a collection of tokens.

Tokenize(String, Collection<PSParseError>) Tokenize(String, Collection<PSParseError>) Tokenize(String, Collection<PSParseError>)

Parse a script into a collection of tokens.

Applies to