Class Ek9SyntaxHighlighter

java.lang.Object
org.ek9lang.cli.Ek9SyntaxHighlighter

public final class Ek9SyntaxHighlighter extends Object
Provides syntax highlighting for EK9 source code using the actual EK9 lexer. This produces accurate highlighting because it uses the same tokenizer as the compiler.

The highlighter wraps tokens in span elements with CSS classes for styling. It handles all EK9-specific syntax including unique operators, stream pipeline keywords, and various literal types.

  • Constructor Details

  • Method Details

    • highlightLine

      public String highlightLine(String sourceLine)
      Highlights a single line of EK9 source code.
      Parameters:
      sourceLine - the raw source line (not HTML escaped)
      Returns:
      HTML with syntax highlighting spans