Skip to main content

tokenize_code_line

Function tokenize_code_line 

Source
pub fn tokenize_code_line(line: &str, language: &str) -> Vec<CodeSpan>
Expand description

Tokenizes a single source-code line into syntax-highlighted CodeSpan runs for VS Code Eva theming.

§Arguments

  • &str - Source line to tokenize.
  • &str - Language hint ("rust", "ts", "json", "toml", "bash", "diff", etc.).

§Returns

  • Vec<CodeSpan> - Contiguous syntax-classified spans covering the full line.