Class Highlighter

java.lang.Object
io.github.jbastgen.stemma.app.syntax.Highlighter

public final class Highlighter extends Object
Colours source text (feature 52): the kind of every piece of every line. Lines are read one after the other, so comments and strings that run over several lines are right. A line longer than MAX_LINE characters is not read (it stays plain) so that a minified file costs nothing.
  • Field Details

    • MAX_LINE

      public static final int MAX_LINE
      Longer lines are shown without colours.
      See Also:
  • Method Details

    • highlight

      public static List<List<Span>> highlight(Language language, List<String> lines)
      For each line the spans of it; the list has one entry per line (empty when nothing in the line is coloured).