Skip to content
ConsoleMonster
Class

PowerShellHighlighter

ConsoleMonster.Highlighting

Namespace
ConsoleMonster.Highlighting
Assembly
ConsoleMonster
Modifiers
sealed

PowerShell: comments and comment blocks, strings and here-strings, variables, keywords, commands (Verb-Noun), parameters, operators (-eq, -match), type literals ([int]), numbers (with KB/MB suffixes) and punctuation.

Inheritance

  • object
  • PowerShellHighlighter

Constructors

public PowerShellHighlighter() #

Methods

public IReadOnlyList<HighlightToken> Tokenize(string text) #

Tokenizes text.

Parameters

text string required
The text (any line endings).

Returns

IReadOnlyList<HighlightToken> The tokens, in order and not overlapping.

Properties

public string Name { get; } #

The language name, for example "json" (lower case).