Top Inners Fields Constructors Methods
io.github.kusoroadeolu.veneer

public Class JSONSyntaxHighlighter

extends AbstractSyntaxHighlighter
Class Inheritance
Imports
io.github.kusoroadeolu.clique.Clique, io.github.kusoroadeolu.clique.style.StyleBuilder, io.github.kusoroadeolu.veneer.theme.SyntaxTheme, io.github.kusoroadeolu.veneer.utils.Utils, org.antlr.v4.runtime.*, io.github.kusoroadeolu.veneer.JSONLexer, .JSONParser, java.util.HashSet, .Set

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv static class

Field Summary

Inherited from io.github.kusoroadeolu.veneer.AbstractSyntaxHighlighter:
showLineNumberstheme

Constructor Summary

AccessConstructor and Description
public
JSONSyntaxHighlighter(SyntaxTheme theme, boolean showLineNumbers)

public
public
JSONSyntaxHighlighter(boolean showLineNumbers)

public

Method Summary

Modifier and TypeMethod and Description
pack-priv void
applyStyles(Token token, StyleBuilder sb, Set<Integer> keyIndices)

pack-priv void
pack-priv void
public String
highlight(String s)

Implements io.github.kusoroadeolu.veneer.SyntaxHighlighter.highlight.

Highlights the given Java source string.

pack-priv boolean
isKeyword(int type)

Constructor Detail

JSONSyntaxHighlighterback to summary
public JSONSyntaxHighlighter(SyntaxTheme theme, boolean showLineNumbers)
JSONSyntaxHighlighterback to summary
public JSONSyntaxHighlighter()
JSONSyntaxHighlighterback to summary
public JSONSyntaxHighlighter(boolean showLineNumbers)
JSONSyntaxHighlighterback to summary
public JSONSyntaxHighlighter(SyntaxTheme theme)

Method Detail

applyStylesback to summary
pack-priv void applyStyles(Token token, StyleBuilder sb, Set<Integer> keyIndices)
applyWithLinesback to summary
pack-priv void applyWithLines(StyleBuilder sb, CommonTokenStream tokens, Set<Integer> keyIndices)
applyWithoutLinesback to summary
pack-priv void applyWithoutLines(StyleBuilder sb, CommonTokenStream tokens, Set<Integer> keyIndices)
highlightback to summary
public String highlight(String s)

Implements io.github.kusoroadeolu.veneer.SyntaxHighlighter.highlight.

Doc from io.github.kusoroadeolu.veneer.SyntaxHighlighter.highlight.

Highlights the given Java source string.

Annotations
@Override
isKeywordback to summary
pack-priv boolean isKeyword(int type)
io.github.kusoroadeolu.veneer back to summary

pack-priv Class JSONSyntaxHighlighter.DefaultJSONBaseVisitor

extends JSONBaseVisitor<Void>
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final Set<Integer>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Void
Inherited from io.github.kusoroadeolu.veneer.JSONBaseVisitor:
visitArrvisitJsonvisitObjvisitValue

Field Detail

keyIndicesback to summary
private final Set<Integer> keyIndices

Constructor Detail

DefaultJSONBaseVisitorback to summary
public DefaultJSONBaseVisitor(Set<Integer> keyIndices)

Method Detail

visitPairback to summary
public Void visitPair(JSONParser.PairContext ctx)

Overrides io.github.kusoroadeolu.veneer.JSONBaseVisitor.visitPair.

Implements io.github.kusoroadeolu.veneer.JSONVisitor.visitPair.

Doc from io.github.kusoroadeolu.veneer.JSONBaseVisitor.visitPair.

Visit a parse tree produced by JSONParser#pair.

The default implementation returns the result of calling visitChildren on ctx.