Documentation ¶
Index ¶
- Constants
- Variables
- func DefaultTypes() map[ast.LibraryVersion]map[string]Type
- func FuncsByVersion() map[ast.LibraryVersion]FunctionsSignatures
- func ObjectsByVersion() map[ast.LibraryVersion]ObjectsSignatures
- func Pretty(pretty bool) func(*Types) error
- func Size(size int) func(*Types) error
- type FunctionParams
- type FunctionParamsJson
- type FunctionsInVersions
- type FunctionsSignatures
- type FunctionsSignaturesJson
- type ListType
- type ObjectField
- type ObjectInfo
- type ObjectsSignatures
- type SimpleType
- type StdVars
- type TupleType
- type Type
- type Types
- func (t *Types) AST() *node32
- func (t *Types) Add(rule pegRule, begin, end, index uint32)
- func (p *Types) Init(options ...func(*Types) error) error
- func (p *Types) Parse(rule ...int) error
- func (t *Types) PrettyPrintSyntaxTree(buffer string)
- func (t *Types) Print()
- func (p *Types) PrintSyntaxTree()
- func (p *Types) Reset()
- func (p *Types) SprintSyntaxTree() string
- func (t *Types) Tokens() []token32
- func (t *Types) Trim(length uint32)
- func (p *Types) WriteSyntaxTree(w io.Writer)
- type UnionType
- type Variable
- type VarsInVersion
Constants ¶
View Source
const MaxTupleLength = 22
Variables ¶
View Source
var ( AnyType = anyType{} BooleanType = SimpleType{"Boolean"} IntType = SimpleType{"Int"} StringType = SimpleType{"String"} ByteVectorType = SimpleType{"ByteVector"} BigIntType = SimpleType{"BigInt"} ThrowType = throwType{} CallableRetV3 = UnionType{Types: []Type{ SimpleType{Type: "ScriptResult"}, SimpleType{Type: "TransferSet"}, SimpleType{Type: "WriteSet"}, }} CallableRetV4 = ListType{Type: UnionType{Types: []Type{ SimpleType{Type: "BinaryEntry"}, SimpleType{Type: "BooleanEntry"}, SimpleType{Type: "Burn"}, SimpleType{Type: "DeleteEntry"}, SimpleType{Type: "IntegerEntry"}, SimpleType{Type: "Issue"}, SimpleType{Type: "Reissue"}, SimpleType{Type: "ScriptTransfer"}, SimpleType{Type: "SponsorFee"}, SimpleType{Type: "StringEntry"}, }}} CallableRetV5 = UnionType{Types: []Type{ TupleType{Types: []Type{ callableRetV5OnlyList, AnyType, }}, callableRetV5OnlyList, }} )
Functions ¶
func DefaultTypes ¶
func DefaultTypes() map[ast.LibraryVersion]map[string]Type
func FuncsByVersion ¶
func FuncsByVersion() map[ast.LibraryVersion]FunctionsSignatures
func ObjectsByVersion ¶
func ObjectsByVersion() map[ast.LibraryVersion]ObjectsSignatures
Types ¶
type FunctionParams ¶
type FunctionParamsJson ¶
type FunctionsInVersions ¶
type FunctionsInVersions struct { New map[string][]FunctionParamsJson `json:"new"` Remove []string `json:"remove"` }
type FunctionsSignatures ¶
type FunctionsSignatures struct {
Funcs map[string][]FunctionParams
}
func (*FunctionsSignatures) Check ¶
func (sig *FunctionsSignatures) Check(name string) bool
func (*FunctionsSignatures) Get ¶
func (sig *FunctionsSignatures) Get(name string, args []Type) (FunctionParams, bool)
type FunctionsSignaturesJson ¶
type FunctionsSignaturesJson struct {
Versions []FunctionsInVersions `json:"versions"`
}
type ListType ¶
type ListType struct {
Type Type
}
func (*ListType) AppendList ¶
func (*ListType) AppendType ¶
func (ListType) EqualWithEntry ¶
type ObjectField ¶
type ObjectInfo ¶
type ObjectInfo struct { NotConstruct bool Fields []ObjectField }
type ObjectsSignatures ¶
type ObjectsSignatures struct {
Obj map[string]ObjectInfo
}
func (*ObjectsSignatures) GetConstruct ¶
func (s *ObjectsSignatures) GetConstruct(name string, args []Type) (FunctionParams, bool)
func (*ObjectsSignatures) GetField ¶
func (s *ObjectsSignatures) GetField(objType Type, fieldName string) (Type, bool)
func (*ObjectsSignatures) IsExist ¶
func (s *ObjectsSignatures) IsExist(name string) bool
type SimpleType ¶
type SimpleType struct {
Type string
}
func (SimpleType) Equal ¶
func (t SimpleType) Equal(other Type) bool
func (SimpleType) EqualWithEntry ¶
func (t SimpleType) EqualWithEntry(other Type) bool
func (SimpleType) String ¶
func (t SimpleType) String() string
type StdVars ¶
type StdVars struct {
Vars []VarsInVersion `json:"vars"`
}
type Type ¶
func ParseRuntimeType ¶
type Types ¶
func (*Types) PrettyPrintSyntaxTree ¶
func (t *Types) PrettyPrintSyntaxTree(buffer string)
func (*Types) PrintSyntaxTree ¶
func (p *Types) PrintSyntaxTree()
func (*Types) SprintSyntaxTree ¶
func (*Types) WriteSyntaxTree ¶
type UnionType ¶
type UnionType struct {
Types []Type
}
func (*UnionType) AppendType ¶
func (UnionType) EqualWithEntry ¶
type VarsInVersion ¶
Click to show internal directories.
Click to hide internal directories.