Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CatchLexEventError ¶
func CatchLexEventError(lex LexEvent)
func ConvertError ¶ added in v0.2.0
func ConvertError(lex LexEvent, err any) kit.JSchemaError
Types ¶
type LexEvent ¶
type LexEvent struct {
// contains filtered or unexported fields
}
LexEvent the flow of lexical events is generated by the scanner. Events can be used to build tokens, or for other analysis of the structure of the scanned document.
func NewLexEvent ¶
func (LexEvent) Type ¶
func (lex LexEvent) Type() LexEventType
type LexEventType ¶
type LexEventType uint8
LexEventType available lexeme event types. gen:Stringer e Unknown lexical event type
const ( LiteralBegin LexEventType = iota // literal-begin LiteralEnd // literal-end ObjectBegin // object-begin ObjectEnd // object-end ObjectKeyBegin // key-begin ObjectKeyEnd // key-end ObjectValueBegin // value-begin ObjectValueEnd // value-end ArrayBegin // array-begin ArrayEnd // array-end ArrayItemBegin // item-begin ArrayItemEnd // item-end InlineAnnotationBegin // inline-annotation-begin InlineAnnotationEnd // inline-annotation-end InlineAnnotationTextBegin // inline-annotation-text-begin InlineAnnotationTextEnd // inline-annotation-text-end MultiLineAnnotationBegin // multi-line-annotation-begin MultiLineAnnotationEnd // multi-line-annotation-end MultiLineAnnotationTextBegin // multi-line-annotation-text-begin MultiLineAnnotationTextEnd // multi-line-annotation-text-end NewLine // new-line // TypesShortcutBegin indicates that "type" or "or" shortcut was began. TypesShortcutBegin // types-shortcut-begin // TypesShortcutEnd indicates that "type" or "or" shortcut was ended. TypesShortcutEnd // types-shortcut-end KeyShortcutBegin // key-shortcut-begin KeyShortcutEnd // key-shortcut-end // MixedValueBegin indicates that here can be anything: scalar, array, or object. MixedValueBegin // mixed-value-begin MixedValueEnd // mixed-value-end // EndTop character after the last closing JSON or SCHEMA lexeme event. EndTop // end-top )
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.