Loading...
Searching...
No Matches
ml::SyntaxHighlighter Class Referenceabstract

Pure tokenizer: maps source text to colored spans. No linting, no diagnostics — color only. Subclass for custom languages. More...

#include <Malena/Graphics/Text/CodeEditor.h>

Inheritance diagram for ml::SyntaxHighlighter:
[legend]

Public Member Functions

virtual ~SyntaxHighlighter ()=default
virtual std::vector< SyntaxTokentokenize (const std::string &text) const =0

Detailed Description

Pure tokenizer: maps source text to colored spans. No linting, no diagnostics — color only. Subclass for custom languages.

Definition at line 37 of file CodeEditor.h.

Constructor & Destructor Documentation

◆ ~SyntaxHighlighter()

virtual ml::SyntaxHighlighter::~SyntaxHighlighter ( )
virtualdefault

Member Function Documentation

◆ tokenize()

virtual std::vector< SyntaxToken > ml::SyntaxHighlighter::tokenize ( const std::string & text) const
nodiscardpure virtual

Return colored spans for text (only the spans that need coloring; everything else is left at the editor's default text color).

Implemented in ml::BasicSyntaxHighlighter.


The documentation for this class was generated from the following file: