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 4 Iterator[Token] ▼
def tokenize(self, code: str, config: LexerConfig | None = None, *, start: int = 0, end: int | None = None) -> Iterator[Token]
Parameters
Name Type Description
code —
config — Default:None
start — Default:0
end — Default:None
Returns
Iterator[Token]