Module

lexers.powershell_sm

Hand-written PowerShell lexer using state machine approach.

O(n) guaranteed, zero regex, thread-safe.

Classes

PowershellStateMachineLexer 1
PowerShell lexer with # and <# #> comments.

PowerShell lexer with # and <# #> comments.

Methods

tokenize 2 Iterator[Token]
def tokenize(self, code: str, config: LexerConfig | None = None) -> Iterator[Token]
Parameters
Name Type Description
code
config Default:None
Returns
Iterator[Token]