rs_api

package
v0.0.0-...-32d9679 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var One = IntOf(one)
View Source
var RT = &rt{
	[]*ReflectTable{
		intRT,
		stringRT,
	},
}
View Source
var Zero = IntOf(big.NewInt(0))

Functions

This section is empty.

Types

type Environment

type Environment interface {
	PushInt(i Int)
	PushString(s String)

	PopInt()
	PopString()

	GetInt() *Int
	GetString() *String
}

type FuncInvoker

type FuncInvoker struct {
	Func func(env Environment)
}

func (*FuncInvoker) Invoke

func (f *FuncInvoker) Invoke(env Environment)

type Int

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

func IntOf

func IntOf(i *big.Int) *Int

func NewInt

func NewInt(text string, base int) (*Int, error)

func (*Int) CompareTo

func (i *Int) CompareTo(other *Int) int

func (*Int) String

func (i *Int) String() string

func (*Int) ToBytes

func (i *Int) ToBytes() []byte

func (*Int) ToInt

func (i *Int) ToInt() int

type Invoker

type Invoker interface {
	Invoke(env Environment)
}

type ReflectFunction

type ReflectFunction struct {
	Name        string
	ArgsTypes   []Type
	ReturnTypes []Type
	Invoker     Invoker
}

type ReflectTable

type ReflectTable struct {
	Types     []*ReflectType
	Functions []*ReflectFunction
}

type ReflectType

type ReflectType struct {
	Name string
	Type Type
}

type String

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

func NewString

func NewString(text string, parseEscapes bool) (*String, error)

func StringOf

func StringOf(text string) *String

func (*String) String

func (s *String) String() string

type Type

type Type byte
const (
	TypeVoid Type = iota
	TypeInt
	TypeString
)

func (Type) Name

func (t Type) Name() string

Jump to

Keyboard shortcuts

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