tlparser

package
v0.0.0-...-7164d47 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2024 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cursor

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

func NewCursor

func NewCursor(source string) *Cursor

TODO: add `Line() int` and `Col() int` methods

func (*Cursor) IsNext

func (p *Cursor) IsNext(s string) bool

func (*Cursor) ReadAt

func (p *Cursor) ReadAt(at rune) (string, error)

func (*Cursor) ReadDigits

func (p *Cursor) ReadDigits() (string, error)

func (*Cursor) ReadSymbol

func (p *Cursor) ReadSymbol() (rune, error)

func (*Cursor) Skip

func (p *Cursor) Skip(count int)

func (*Cursor) SkipSpaces

func (p *Cursor) SkipSpaces()

func (*Cursor) Unread

func (p *Cursor) Unread(count int)

type Method

type Method struct {
	Name       string
	CRC        uint32
	Comment    string
	Parameters []Parameter
	Response   MethodResponse
}

type MethodResponse

type MethodResponse struct {
	Type   string
	IsList bool
}

type Object

type Object struct {
	Name       string
	Comment    string
	CRC        uint32
	Parameters []Parameter
	Interface  string
}

type Parameter

type Parameter struct {
	Name         string
	Type         string
	Comment      string
	IsVector     bool
	IsOptional   bool
	Version      int
	BitToTrigger int
}

type Schema

type Schema struct {
	Objects      []Object
	Methods      []Method
	TypeComments map[string]string
}

func ParseSchema

func ParseSchema(source string) (*Schema, error)

Jump to

Keyboard shortcuts

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