[91:14] static extends: object
Priority-ordered list of [regexPattern, tokenType] pairs. Derived from Scanner.jflex. Patterns are tried in order; the first match wins. Each pattern is anchored with ^ so it only matches at the start of the remaining source string.
[36:14] static extends: object
Token type string constants used by the Tokenizer and Highlighter.
[81:14] static extends: object
Simple counter used to generate unique IDs for copy buttons.
[56:14] static extends: object
Aussom keyword and boolean literal sets used during tokenization. Keywords are stored as both a list (for reference) and a map (for O(1) lookup during tokenization).
[118:7] extends: object
The Tokenizer breaks an Aussom source string into a list of token maps. Each token is a map with keys "type" (string) and "text" (string). Uses character-class dispatch to avoid trying all regex patterns for every token position. The first character at the current position determines which small subset of patterns to try.
Tokenizer ()
Constructs a new Tokenizer instance.
tokenize (string Code)
Tokenizes the provided Aussom source code string.
Code is the Aussom source string to tokenize.A list of maps, each with "type" and "text" keys.[393:7] extends: object
The Highlighter tokenizes Aussom source code and produces a styled HNode tree resembling a Shiki code window. Output structure: Div.aus-highlighter Div.aus-header Span.aus-lang-label "aussom" Button.aus-copy-btn "Copy" (optional, ShowCopyButton = true) Pre.aus-pre Code.aus-code Span.aus-line (one per source line) Span.aus-line-num (optional, ShowLineNumbers = true) Span.aus-token.aus-{type} (one per token) Token text is inserted as DOM Text nodes so HTML special characters (<, >, &) are not interpreted as markup.
Highlighter (Theme = null, bool ShowLineNumbers = false, bool ShowCopyButton = false)
Constructs a new Highlighter.
Theme is an optional theme name ("dark" or "light") or a custom map of {tokenType: colorString}. Defaults to "dark".ShowLineNumbers is an optional bool to show a line-number gutter. Defaults to false.ShowCopyButton is an optional bool to show a "Copy" button in the header. Defaults to false.setTheme (Theme)
Sets the active theme. Can be called after construction to switch themes.
Theme is a theme name ("dark" or "light") or a custom map.this objecthighlight (string Code)
Highlights the provided Aussom source code and returns a styled HNode Div.
Code is the Aussom source string to highlight.A Div HNode containing the complete code window.[24:7] extends: HNode
Internal HNode wrapper for the HTML 'code' element. Not included in hnodes.aus, so defined here.
Code ()
Constructs a 'code' element.
[337:14] static extends: object
Built-in theme definitions for the Highlighter. The "dark" theme mirrors VS Code's dark palette; "light" mirrors VS Code light.