Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CatchLexEventError ¶
func CatchLexEventError(lex LexEvent)
func NewLexEventError ¶
func NewLexEventError(lex LexEvent, err errors.Err) errors.DocumentError
Types ¶
type LexEvent ¶
type LexEvent struct {
// contains filtered or unexported fields
}
func NewLexEvent ¶
func (LexEvent) Type ¶
func (lex LexEvent) Type() LexEventType
type LexEventType ¶
type LexEventType uint8
const ( LiteralBegin LexEventType = iota LiteralEnd ObjectBegin ObjectEnd ObjectKeyBegin ObjectKeyEnd ObjectValueBegin ObjectValueEnd ArrayBegin ArrayEnd ArrayItemBegin ArrayItemEnd InlineAnnotationBegin InlineAnnotationEnd InlineAnnotationTextBegin InlineAnnotationTextEnd MultiLineAnnotationBegin MultiLineAnnotationEnd MultiLineAnnotationTextBegin MultiLineAnnotationTextEnd NewLine // TypesShortcutBegin indicates that "type" or "or" shortcut was began. TypesShortcutBegin // TypesShortcutEnd indicates that "type" or "or" shortcut was ended. TypesShortcutEnd KeyShortcutBegin KeyShortcutEnd // MixedValueBegin indicates that here can be anything: scalar, array, or object. MixedValueBegin MixedValueEnd EndTop // character after the last closing JSON or SCHEMA lexeme event )
func (LexEventType) IsOneOf ¶
func (e LexEventType) IsOneOf(ll ...LexEventType) bool
IsOneOf returns true if given lexeme type is equal to at least one of specified.
func (LexEventType) IsOpening ¶
func (e LexEventType) IsOpening() bool
func (LexEventType) String ¶
func (e LexEventType) String() string
Click to show internal directories.
Click to hide internal directories.