types

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: May 27, 2024 License: BSD-2-Clause Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AcceptStructField

func AcceptStructField(s *parse.ParseState, fieldName node.IdentifierNode, fieldType TypeNode) *structFieldNode

func AcceptStructFieldUnnamed

func AcceptStructFieldUnnamed(s *parse.ParseState, fieldType TypeNode) *structFieldNode

func AcceptTypeSize

func AcceptTypeSize(s *parse.ParseState, size int) *typeSizeNode

func AcceptTypeSizeMax

func AcceptTypeSizeMax(s *parse.ParseState) *typeSizeNode

func NewStructField

func NewStructField(fieldName node.IdentifierNode, fieldType TypeNode) *structFieldNode

func NewStructFieldUnnamed

func NewStructFieldUnnamed(fieldType TypeNode) *structFieldNode

func NewTypeSize

func NewTypeSize(size int) *typeSizeNode

func NewTypeSizeMax

func NewTypeSizeMax() *typeSizeNode

Types

type StructFieldNode

type StructFieldNode interface {
	node.Node
	Named() bool
	Name() node.IdentifierNode
	Type() TypeNode
}

type TypeCode

type TypeCode int
const (
	TypeCodeUnspecified TypeCode = iota
	TypeCodeArray
	TypeCodeBool
	TypeCodeBytes
	TypeCodeDate
	TypeCodeJSON
	TypeCodeInt64
	TypeCodeNumeric
	TypeCodeFloat64
	TypeCodeString
	TypeCodeStruct
	TypeCodeTimestamp
)

func (TypeCode) String

func (i TypeCode) String() string

type TypeNode

type TypeNode interface {
	node.Node
	TypeCode() TypeCode
	IsScalar() bool
	ScalarName() string
	ScalarSized() bool
	ScalarSize() TypeSizeNode
	IsArray() bool
	ArrayElement() TypeNode
	IsStruct() bool
	StructFields() []StructFieldNode
}

func AcceptArray

func AcceptArray(s *parse.ParseState, element TypeNode) TypeNode

func AcceptBool

func AcceptBool(s *parse.ParseState) TypeNode

func AcceptBytes

func AcceptBytes(s *parse.ParseState) TypeNode

func AcceptBytesSized

func AcceptBytesSized(s *parse.ParseState, size TypeSizeNode) TypeNode

func AcceptDate

func AcceptDate(s *parse.ParseState) TypeNode

func AcceptFloat64

func AcceptFloat64(s *parse.ParseState) TypeNode

func AcceptInt64

func AcceptInt64(s *parse.ParseState) TypeNode

func AcceptJSON

func AcceptJSON(s *parse.ParseState) TypeNode

func AcceptNumeric

func AcceptNumeric(s *parse.ParseState) TypeNode

func AcceptString

func AcceptString(s *parse.ParseState) TypeNode

func AcceptStringSized

func AcceptStringSized(s *parse.ParseState, size TypeSizeNode) TypeNode

func AcceptStruct

func AcceptStruct(s *parse.ParseState, fields []StructFieldNode) TypeNode

func AcceptTimestamp

func AcceptTimestamp(s *parse.ParseState) TypeNode

func NewArray

func NewArray(element TypeNode) TypeNode

func NewBool

func NewBool() TypeNode

func NewBytes

func NewBytes() TypeNode

func NewBytesSized

func NewBytesSized(size TypeSizeNode) TypeNode

func NewDate

func NewDate() TypeNode

func NewFloat64

func NewFloat64() TypeNode

func NewInt64

func NewInt64() TypeNode

func NewJSON

func NewJSON() TypeNode

func NewNumeric

func NewNumeric() TypeNode

func NewString

func NewString() TypeNode

func NewStringSized

func NewStringSized(size TypeSizeNode) TypeNode

func NewStruct

func NewStruct(fields []StructFieldNode) TypeNode

func NewTimestamp

func NewTimestamp() TypeNode

type TypeSizeNode

type TypeSizeNode interface {
	node.Node
	Max() bool
	Size() int
}

Jump to

Keyboard shortcuts

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