lexer

package
v3.1.0-alpha.2 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const LexedStatements_TypeID = 0xa11f97b9d6c73dd4

LexedStatements_TypeID is the unique identifier for the type LexedStatements.

View Source
const LexedTokens_TypeID = 0x9e69a92512b19d18

LexedTokens_TypeID is the unique identifier for the type LexedTokens.

View Source
const Statement_TypeID = 0xc6725e678d60fa37

Statement_TypeID is the unique identifier for the type Statement.

View Source
const Token_TypeID = 0x91cc55cd57de5419

Token_TypeID is the unique identifier for the type Token.

Variables

This section is empty.

Functions

func RegisterSchema

func RegisterSchema(reg *schemas.Registry)

Types

type LexedStatements

type LexedStatements capnp.Struct

func NewLexedStatements

func NewLexedStatements(s *capnp.Segment) (LexedStatements, error)

func NewRootLexedStatements

func NewRootLexedStatements(s *capnp.Segment) (LexedStatements, error)

func ReadRootLexedStatements

func ReadRootLexedStatements(msg *capnp.Message) (LexedStatements, error)

func (LexedStatements) DecodeFromPtr

func (LexedStatements) DecodeFromPtr(p capnp.Ptr) LexedStatements

func (LexedStatements) EncodeAsPtr

func (s LexedStatements) EncodeAsPtr(seg *capnp.Segment) capnp.Ptr

func (LexedStatements) HasStatements

func (s LexedStatements) HasStatements() bool

func (LexedStatements) IsValid

func (s LexedStatements) IsValid() bool

func (LexedStatements) Message

func (s LexedStatements) Message() *capnp.Message

func (LexedStatements) NewStatements

func (s LexedStatements) NewStatements(n int32) (Statement_List, error)

NewStatements sets the statements field to a newly allocated Statement_List, preferring placement in s's segment.

func (LexedStatements) Segment

func (s LexedStatements) Segment() *capnp.Segment

func (LexedStatements) SetStatements

func (s LexedStatements) SetStatements(v Statement_List) error

func (LexedStatements) Statements

func (s LexedStatements) Statements() (Statement_List, error)

func (LexedStatements) String

func (s LexedStatements) String() string

func (LexedStatements) ToPtr

func (s LexedStatements) ToPtr() capnp.Ptr

type LexedStatements_Future

type LexedStatements_Future struct{ *capnp.Future }

LexedStatements_Future is a wrapper for a LexedStatements promised by a client call.

func (LexedStatements_Future) Struct

type LexedStatements_List

type LexedStatements_List = capnp.StructList[LexedStatements]

LexedStatements_List is a list of LexedStatements.

func NewLexedStatements_List

func NewLexedStatements_List(s *capnp.Segment, sz int32) (LexedStatements_List, error)

NewLexedStatements creates a new list of LexedStatements.

type LexedTokens

type LexedTokens capnp.Struct

func NewLexedTokens

func NewLexedTokens(s *capnp.Segment) (LexedTokens, error)

func NewRootLexedTokens

func NewRootLexedTokens(s *capnp.Segment) (LexedTokens, error)

func ReadRootLexedTokens

func ReadRootLexedTokens(msg *capnp.Message) (LexedTokens, error)

func (LexedTokens) DecodeFromPtr

func (LexedTokens) DecodeFromPtr(p capnp.Ptr) LexedTokens

func (LexedTokens) EncodeAsPtr

func (s LexedTokens) EncodeAsPtr(seg *capnp.Segment) capnp.Ptr

func (LexedTokens) HasTokens

func (s LexedTokens) HasTokens() bool

func (LexedTokens) IsValid

func (s LexedTokens) IsValid() bool

func (LexedTokens) Message

func (s LexedTokens) Message() *capnp.Message

func (LexedTokens) NewTokens

func (s LexedTokens) NewTokens(n int32) (Token_List, error)

NewTokens sets the tokens field to a newly allocated Token_List, preferring placement in s's segment.

func (LexedTokens) Segment

func (s LexedTokens) Segment() *capnp.Segment

func (LexedTokens) SetTokens

func (s LexedTokens) SetTokens(v Token_List) error

func (LexedTokens) String

func (s LexedTokens) String() string

func (LexedTokens) ToPtr

func (s LexedTokens) ToPtr() capnp.Ptr

func (LexedTokens) Tokens

func (s LexedTokens) Tokens() (Token_List, error)

type LexedTokens_Future

type LexedTokens_Future struct{ *capnp.Future }

LexedTokens_Future is a wrapper for a LexedTokens promised by a client call.

func (LexedTokens_Future) Struct

func (f LexedTokens_Future) Struct() (LexedTokens, error)

type LexedTokens_List

type LexedTokens_List = capnp.StructList[LexedTokens]

LexedTokens_List is a list of LexedTokens.

func NewLexedTokens_List

func NewLexedTokens_List(s *capnp.Segment, sz int32) (LexedTokens_List, error)

NewLexedTokens creates a new list of LexedTokens.

type Statement

type Statement capnp.Struct

func NewRootStatement

func NewRootStatement(s *capnp.Segment) (Statement, error)

func NewStatement

func NewStatement(s *capnp.Segment) (Statement, error)

func ReadRootStatement

func ReadRootStatement(msg *capnp.Message) (Statement, error)

func (Statement) Block

func (s Statement) Block() (Statement_List, error)

func (Statement) DecodeFromPtr

func (Statement) DecodeFromPtr(p capnp.Ptr) Statement

func (Statement) DocComment

func (s Statement) DocComment() (string, error)

func (Statement) DocCommentBytes

func (s Statement) DocCommentBytes() ([]byte, error)

func (Statement) EncodeAsPtr

func (s Statement) EncodeAsPtr(seg *capnp.Segment) capnp.Ptr

func (Statement) EndByte

func (s Statement) EndByte() uint32

func (Statement) HasBlock

func (s Statement) HasBlock() bool

func (Statement) HasDocComment

func (s Statement) HasDocComment() bool

func (Statement) HasTokens

func (s Statement) HasTokens() bool

func (Statement) IsValid

func (s Statement) IsValid() bool

func (Statement) Message

func (s Statement) Message() *capnp.Message

func (Statement) NewBlock

func (s Statement) NewBlock(n int32) (Statement_List, error)

NewBlock sets the block field to a newly allocated Statement_List, preferring placement in s's segment.

func (Statement) NewTokens

func (s Statement) NewTokens(n int32) (Token_List, error)

NewTokens sets the tokens field to a newly allocated Token_List, preferring placement in s's segment.

func (Statement) Segment

func (s Statement) Segment() *capnp.Segment

func (Statement) SetBlock

func (s Statement) SetBlock(v Statement_List) error

func (Statement) SetDocComment

func (s Statement) SetDocComment(v string) error

func (Statement) SetEndByte

func (s Statement) SetEndByte(v uint32)

func (Statement) SetLine

func (s Statement) SetLine()

func (Statement) SetStartByte

func (s Statement) SetStartByte(v uint32)

func (Statement) SetTokens

func (s Statement) SetTokens(v Token_List) error

func (Statement) StartByte

func (s Statement) StartByte() uint32

func (Statement) String

func (s Statement) String() string

func (Statement) ToPtr

func (s Statement) ToPtr() capnp.Ptr

func (Statement) Tokens

func (s Statement) Tokens() (Token_List, error)

func (Statement) Which

func (s Statement) Which() Statement_Which

type Statement_Future

type Statement_Future struct{ *capnp.Future }

Statement_Future is a wrapper for a Statement promised by a client call.

func (Statement_Future) Struct

func (f Statement_Future) Struct() (Statement, error)

type Statement_List

type Statement_List = capnp.StructList[Statement]

Statement_List is a list of Statement.

func NewStatement_List

func NewStatement_List(s *capnp.Segment, sz int32) (Statement_List, error)

NewStatement creates a new list of Statement.

type Statement_Which

type Statement_Which uint16
const (
	Statement_Which_line  Statement_Which = 0
	Statement_Which_block Statement_Which = 1
)

func (Statement_Which) String

func (w Statement_Which) String() string

type Token

type Token capnp.Struct

func NewRootToken

func NewRootToken(s *capnp.Segment) (Token, error)

func NewToken

func NewToken(s *capnp.Segment) (Token, error)

func ReadRootToken

func ReadRootToken(msg *capnp.Message) (Token, error)

func (Token) BinaryLiteral

func (s Token) BinaryLiteral() ([]byte, error)

func (Token) BracketedList

func (s Token) BracketedList() (capnp.PointerList, error)

func (Token) DecodeFromPtr

func (Token) DecodeFromPtr(p capnp.Ptr) Token

func (Token) EncodeAsPtr

func (s Token) EncodeAsPtr(seg *capnp.Segment) capnp.Ptr

func (Token) EndByte

func (s Token) EndByte() uint32

func (Token) FloatLiteral

func (s Token) FloatLiteral() float64

func (Token) HasBinaryLiteral

func (s Token) HasBinaryLiteral() bool

func (Token) HasBracketedList

func (s Token) HasBracketedList() bool

func (Token) HasIdentifier

func (s Token) HasIdentifier() bool

func (Token) HasOperator

func (s Token) HasOperator() bool

func (Token) HasParenthesizedList

func (s Token) HasParenthesizedList() bool

func (Token) HasStringLiteral

func (s Token) HasStringLiteral() bool

func (Token) Identifier

func (s Token) Identifier() (string, error)

func (Token) IdentifierBytes

func (s Token) IdentifierBytes() ([]byte, error)

func (Token) IntegerLiteral

func (s Token) IntegerLiteral() uint64

func (Token) IsValid

func (s Token) IsValid() bool

func (Token) Message

func (s Token) Message() *capnp.Message

func (Token) NewBracketedList

func (s Token) NewBracketedList(n int32) (capnp.PointerList, error)

NewBracketedList sets the bracketedList field to a newly allocated capnp.PointerList, preferring placement in s's segment.

func (Token) NewParenthesizedList

func (s Token) NewParenthesizedList(n int32) (capnp.PointerList, error)

NewParenthesizedList sets the parenthesizedList field to a newly allocated capnp.PointerList, preferring placement in s's segment.

func (Token) Operator

func (s Token) Operator() (string, error)

func (Token) OperatorBytes

func (s Token) OperatorBytes() ([]byte, error)

func (Token) ParenthesizedList

func (s Token) ParenthesizedList() (capnp.PointerList, error)

func (Token) Segment

func (s Token) Segment() *capnp.Segment

func (Token) SetBinaryLiteral

func (s Token) SetBinaryLiteral(v []byte) error

func (Token) SetBracketedList

func (s Token) SetBracketedList(v capnp.PointerList) error

func (Token) SetEndByte

func (s Token) SetEndByte(v uint32)

func (Token) SetFloatLiteral

func (s Token) SetFloatLiteral(v float64)

func (Token) SetIdentifier

func (s Token) SetIdentifier(v string) error

func (Token) SetIntegerLiteral

func (s Token) SetIntegerLiteral(v uint64)

func (Token) SetOperator

func (s Token) SetOperator(v string) error

func (Token) SetParenthesizedList

func (s Token) SetParenthesizedList(v capnp.PointerList) error

func (Token) SetStartByte

func (s Token) SetStartByte(v uint32)

func (Token) SetStringLiteral

func (s Token) SetStringLiteral(v string) error

func (Token) StartByte

func (s Token) StartByte() uint32

func (Token) String

func (s Token) String() string

func (Token) StringLiteral

func (s Token) StringLiteral() (string, error)

func (Token) StringLiteralBytes

func (s Token) StringLiteralBytes() ([]byte, error)

func (Token) ToPtr

func (s Token) ToPtr() capnp.Ptr

func (Token) Which

func (s Token) Which() Token_Which

type Token_Future

type Token_Future struct{ *capnp.Future }

Token_Future is a wrapper for a Token promised by a client call.

func (Token_Future) Struct

func (f Token_Future) Struct() (Token, error)

type Token_List

type Token_List = capnp.StructList[Token]

Token_List is a list of Token.

func NewToken_List

func NewToken_List(s *capnp.Segment, sz int32) (Token_List, error)

NewToken creates a new list of Token.

type Token_Which

type Token_Which uint16
const (
	Token_Which_identifier        Token_Which = 0
	Token_Which_stringLiteral     Token_Which = 1
	Token_Which_binaryLiteral     Token_Which = 7
	Token_Which_integerLiteral    Token_Which = 2
	Token_Which_floatLiteral      Token_Which = 3
	Token_Which_operator          Token_Which = 4
	Token_Which_parenthesizedList Token_Which = 5
	Token_Which_bracketedList     Token_Which = 6
)

func (Token_Which) String

func (w Token_Which) String() string

Jump to

Keyboard shortcuts

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