token

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidLengthToken        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowToken          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupToken = fmt.Errorf("proto: unexpected end of group")
)
View Source
var Type_name = map[int32]string{
	0:  "ILLEGAL",
	1:  "EOF",
	2:  "IDENT",
	3:  "INT",
	4:  "COMMA",
	5:  "SEMICOLON",
	6:  "LPAREN",
	7:  "RPAREN",
	8:  "LBRACKET",
	9:  "RBRACKET",
	10: "AND",
	11: "OR",
	12: "TRUE",
	13: "FALSE",
}
View Source
var Type_value = map[string]int32{
	"ILLEGAL":   0,
	"EOF":       1,
	"IDENT":     2,
	"INT":       3,
	"COMMA":     4,
	"SEMICOLON": 5,
	"LPAREN":    6,
	"RPAREN":    7,
	"LBRACKET":  8,
	"RBRACKET":  9,
	"AND":       10,
	"OR":        11,
	"TRUE":      12,
	"FALSE":     13,
}

Functions

This section is empty.

Types

type Token

type Token struct {
	Type    Type   `protobuf:"varint,1,opt,name=type,proto3,enum=shield.token.Type" json:"type,omitempty"`
	Literal string `protobuf:"bytes,2,opt,name=literal,proto3" json:"literal,omitempty"`
}

func (*Token) Descriptor

func (*Token) Descriptor() ([]byte, []int)

func (*Token) GetLiteral

func (m *Token) GetLiteral() string

func (*Token) GetType

func (m *Token) GetType() Type

func (*Token) Marshal

func (m *Token) Marshal() (dAtA []byte, err error)

func (*Token) MarshalTo

func (m *Token) MarshalTo(dAtA []byte) (int, error)

func (*Token) MarshalToSizedBuffer

func (m *Token) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Token) ProtoMessage

func (*Token) ProtoMessage()

func (*Token) Reset

func (m *Token) Reset()

func (*Token) Size

func (m *Token) Size() (n int)

func (*Token) String

func (m *Token) String() string

func (*Token) Unmarshal

func (m *Token) Unmarshal(dAtA []byte) error

func (*Token) XXX_DiscardUnknown

func (m *Token) XXX_DiscardUnknown()

func (*Token) XXX_Marshal

func (m *Token) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Token) XXX_Merge

func (m *Token) XXX_Merge(src proto.Message)

func (*Token) XXX_Size

func (m *Token) XXX_Size() int

func (*Token) XXX_Unmarshal

func (m *Token) XXX_Unmarshal(b []byte) error

type Type

type Type int32
const (
	Type_ILLEGAL   Type = 0
	Type_EOF       Type = 1
	Type_IDENT     Type = 2
	Type_INT       Type = 3
	Type_COMMA     Type = 4
	Type_SEMICOLON Type = 5
	Type_LPAREN    Type = 6
	Type_RPAREN    Type = 7
	Type_LBRACKET  Type = 8
	Type_RBRACKET  Type = 9
	Type_AND       Type = 10
	Type_OR        Type = 11
	Type_TRUE      Type = 12
	Type_FALSE     Type = 13
)

func LookupIdent

func LookupIdent(ident string) Type

func (Type) EnumDescriptor

func (Type) EnumDescriptor() ([]byte, []int)

func (Type) String

func (x Type) String() string

Jump to

Keyboard shortcuts

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