Documentation ¶
Index ¶
- Constants
- Variables
- func AdvancedShell(fn hanlder)
- func BasicShell(fn hanlder)
- func PrettyPrint(input string)
- type PrettyPrintErrorListener
- type PrettyPrintListener
- func (s *PrettyPrintListener) EnterArray(ctx *parser.ArrayContext)
- func (s *PrettyPrintListener) EnterObject(ctx *parser.ObjectContext)
- func (s *PrettyPrintListener) EnterPair(ctx *parser.PairContext)
- func (s *PrettyPrintListener) EnterValue(ctx *parser.ValueContext)
- func (s *PrettyPrintListener) ExitArray(ctx *parser.ArrayContext)
- func (s *PrettyPrintListener) ExitJson(ctx *parser.JsonContext)
- func (s *PrettyPrintListener) ExitObject(ctx *parser.ObjectContext)
- func (s *PrettyPrintListener) ExitPair(ctx *parser.PairContext)
- func (s *PrettyPrintListener) VisitErrorNode(node antlr.ErrorNode)
- func (s *PrettyPrintListener) VisitTerminal(node antlr.TerminalNode)
Constants ¶
View Source
const ( COLOR_Reset = "\033[0m" COLOR_Black = "\033[0;30m" COLOR_Red = "\033[0;31m" COLOR_Green = "\033[0;32m" COLOR_Brown = "\033[0;33m" COLOR_Blue = "\033[0;34m" COLOR_Purple = "\033[0;35m" COLOR_Cyan = "\033[0;36m" COLOR_Light_Gray = "\033[0;37m" COLOR_Dark_Gray = "\033[1;30m" COLOR_Light_Red = "\033[1;31m" COLOR_Light_Green = "\033[1;32m" COLOR_Yellow = "\033[1;33m" COLOR_Light_Blue = "\033[1;34m" COLOR_Light_Purple = "\033[1;35m" COLOR_Light_Cyan = "\033[1;36m" COLOR_White = "\033[1;37m" )
Variables ¶
View Source
var ( IDENT_CHAR = strings.Repeat(" ", 4) CRLF = "\r\n" )
Functions ¶
func AdvancedShell ¶
func AdvancedShell(fn hanlder)
func BasicShell ¶
func BasicShell(fn hanlder)
func PrettyPrint ¶
func PrettyPrint(input string)
Types ¶
type PrettyPrintErrorListener ¶
type PrettyPrintErrorListener struct {
*antlr.DefaultErrorListener
}
func NewPrettyPrintErrorListener ¶
func NewPrettyPrintErrorListener() *PrettyPrintErrorListener
func (*PrettyPrintErrorListener) SyntaxError ¶
func (c *PrettyPrintErrorListener) SyntaxError( recognizer antlr.Recognizer, offendingSymbol interface{}, line, column int, msg string, e antlr.RecognitionException, )
type PrettyPrintListener ¶
type PrettyPrintListener struct { *parser.BaseJSONListener // contains filtered or unexported fields }
func NewPrettyPrintListener ¶
func NewPrettyPrintListener() *PrettyPrintListener
func (*PrettyPrintListener) EnterArray ¶
func (s *PrettyPrintListener) EnterArray(ctx *parser.ArrayContext)
EnterArray is called when production array is entered.
func (*PrettyPrintListener) EnterObject ¶
func (s *PrettyPrintListener) EnterObject(ctx *parser.ObjectContext)
EnterObject is called when production object is entered.
func (*PrettyPrintListener) EnterPair ¶
func (s *PrettyPrintListener) EnterPair(ctx *parser.PairContext)
EnterPair is called when production pair is entered.
func (*PrettyPrintListener) EnterValue ¶
func (s *PrettyPrintListener) EnterValue(ctx *parser.ValueContext)
EnterValue is called when production value is entered.
func (*PrettyPrintListener) ExitArray ¶
func (s *PrettyPrintListener) ExitArray(ctx *parser.ArrayContext)
ExitArray is called when production array is exited.
func (*PrettyPrintListener) ExitJson ¶
func (s *PrettyPrintListener) ExitJson(ctx *parser.JsonContext)
ExitJson is called when production json is exited.
func (*PrettyPrintListener) ExitObject ¶
func (s *PrettyPrintListener) ExitObject(ctx *parser.ObjectContext)
ExitObject is called when production object is exited.
func (*PrettyPrintListener) ExitPair ¶
func (s *PrettyPrintListener) ExitPair(ctx *parser.PairContext)
ExitPair is called when production pair is exited.
func (*PrettyPrintListener) VisitErrorNode ¶
func (s *PrettyPrintListener) VisitErrorNode(node antlr.ErrorNode)
VisitErrorNode is called when an error node is visited.
func (*PrettyPrintListener) VisitTerminal ¶
func (s *PrettyPrintListener) VisitTerminal(node antlr.TerminalNode)
VisitTerminal is called when a terminal node is visited.
Click to show internal directories.
Click to hide internal directories.