lexer

package
v0.2.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 17, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const IndexedIdentifierChars = `["]`

IndexedIdentifierChars are chars any indexed-identifier would have

Variables

This section is empty.

Functions

func IsIndexedIdentifier added in v0.2.3

func IsIndexedIdentifier(id string) bool

IsIndexedIdentifier returns true if id is:

table.field["key"]
table.field[key]
field["key"]
field[key]

IsIndexedIdentifier returns false if id is:

table.field
field

Types

type IdentifierParts added in v0.2.3

type IdentifierParts struct {
	Table string // component before dot (empty if no dot)
	Field string // component after dot
	Key   string // index key (empty if no key)
}

IdentifierParts holds components of splitted identifiers: Examples of unsplitted identitiers:

table.field["key"]
table.field[key]
table.field
field["key"]
field[key]
field

func SplitIdentifier added in v0.2.3

func SplitIdentifier(id string) *IdentifierParts

SplitIdentifier splits id into IdentifierParts

type Lexer

type Lexer struct {
	// contains filtered or unexported fields
}

func New

func New(input string) *Lexer

func (*Lexer) NextToken

func (l *Lexer) NextToken() token.Token

type SwaggerTypeParts added in v0.2.3

type SwaggerTypeParts struct {
	App  string // component before dot (empty if no dot)
	Type string // component after dot
}

SwaggerTypeParts holds components of splitted swagger-types: Examples of unsplitted swagger-types:

app.type
type

func SplitSwaggerType added in v0.2.3

func SplitSwaggerType(swtype string) *SwaggerTypeParts

SplitSwaggerType splits swagger-type into SwaggerTypeParts

func (SwaggerTypeParts) String added in v0.2.3

func (swParts SwaggerTypeParts) String() string

String implements fmt.Stringer interface

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL