Skip to content
jrguenther edited this page Sep 30, 2014 · 1 revision

Architecture

  1. You have text you want to highlight
  2. You lex it
  3. You might parse it
  4. You walk the parse tree or iterate over the token list to generate start and end positions for each token in the input text
  5. You map the token type to a style class
  6. A Formatter takes the start/end info of the token and generates the appropriate output object. The output object could be an HTML document, or StyleSpans for use in RichTextFX.
Clone this wiki locally