parser

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsBuiltInType

func IsBuiltInType(t Type) bool

func IsBuiltInTypeByName

func IsBuiltInTypeByName(n string) bool

Types

type BoolType

type BoolType struct {
}

func (BoolType) Name

func (this BoolType) Name() string

type BuiltInVectorType

type BuiltInVectorType struct {
	Type
}

func (BuiltInVectorType) Name

func (this BuiltInVectorType) Name() string

type BytesType

type BytesType struct {
}

func (BytesType) Name

func (this BytesType) Name() string

type Constructor

type Constructor struct {
	Predicate string
	Id        int32
	//PrmsList []string
	//Prms map[string]Type
	//HasFlags bool
	//ConditionsList []string
	//Conditions map[string]string
	//TrivialConditions []string
	ParamList []Param
	BaseType  Type
	Line      string
}

typesDict[restype].append([name, typeid, prmsList, prms, hasFlags, conditionsList, conditions, trivialConditions, line]);

func NewConstructor

func NewConstructor(id int32, predicate, params, typeName string) Constructor

func (Constructor) Name

func (this Constructor) Name() string

type CustomType

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

func MakeCustomType

func MakeCustomType(restype string) CustomType

func (CustomType) Name

func (this CustomType) Name() string

type DoubleType

type DoubleType struct {
}

func (DoubleType) Name

func (this DoubleType) Name() string

type FlagsType

type FlagsType struct {
}

/////////////////////////////////////////////////////////////////////////////

func (FlagsType) Name

func (this FlagsType) Name() string

type Function

type Function struct {
	Method string
	Id     int32
	//PrmsList []string
	//Prms map[string]Type
	//HasFlags bool
	//ConditionsList []string
	//Conditions map[string]string
	//TrivialConditions []string
	ParamList []Param
	ResType   Type
	Line      string
}

funcsDict[restype].append([name, typeid, prmsList, prms, hasFlags, conditionsList, conditions, trivialConditions, line]);

func NewFunction

func NewFunction(id int32, method, params, typeName string) Function

type Int128Type

type Int128Type struct {
}

func (Int128Type) Name

func (this Int128Type) Name() string

type Int256Type

type Int256Type struct {
}

func (Int256Type) Name

func (this Int256Type) Name() string

type IntType

type IntType struct {
}

func (IntType) Name

func (this IntType) Name() string

type LongType

type LongType struct {
}

func (LongType) Name

func (this LongType) Name() string

type MTProtoSchemas

type MTProtoSchemas struct {
	Layer string // layer

	/////////////////// Layer cons
	LayerCons *Schemas
	/// Authorization key creation
	Handshake *Schemas
	////////////// System messages
	Transport *Schemas
	///////// Main application API
	Sync *Schemas
}

func NewMTProtoSchemas

func NewMTProtoSchemas() *MTProtoSchemas

func Parse

func Parse(filePath string) (*MTProtoSchemas, error)

func (*MTProtoSchemas) GetSchemas

func (this *MTProtoSchemas) GetSchemas(schemaType string) *Schemas

type Param

type Param struct {
	Name string
	Type
}

type Schemas

type Schemas struct {
	TypeMap         map[string]Type
	ConstructorList []Constructor
	FunctionList    []Function
}

///////////////// Layer cons

func NewSchemas

func NewSchemas() *Schemas

type StringType

type StringType struct {
}

func (StringType) Name

func (this StringType) Name() string

type SubFlagsType

type SubFlagsType struct {
	// name string	// flags.0:true
	Mask string
	Type
}

func (SubFlagsType) Name

func (this SubFlagsType) Name() string

type TVectorType

type TVectorType struct {
	Type
}

func (TVectorType) Name

func (this TVectorType) Name() string

type TemplateType

type TemplateType struct {
}

////////////////////////////////////////////////////////////////////////

func (TemplateType) Name

func (this TemplateType) Name() string

type Type

type Type interface {
	Name() string
}

func MakeBuiltInType

func MakeBuiltInType(n string) Type

Jump to

Keyboard shortcuts

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