inst

package
v0.0.0-...-5eebaeb Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2023 License: MIT Imports: 33 Imported by: 0

Documentation

Overview

Package inst 脚本基础指令集的实现。

Index

Constants

View Source
const (
	RETURN int = iota
	EXIT
)

退出类型定义

View Source
const (
	SOURCE_ALL   = 0  // 全部
	SOURCE_PAST  = -1 // 已执行过(含当前)
	SOURCE_PASTX = -2 // 已执行过(NULL=>当前)
	SOURCE_NEXT  = 1  // 后阶部分
	SOURCE_XALL  = 2  // NULL=>末尾
)

脚本源码片段标识 仅针对当前块,包含子块但无法包含父块。

Variables

View Source
var (
	// 通关检查失败。
	NotPass = errors.New(_T("通关验证没有通过"))

	// 模式取值失败。
	ErrModel = errors.New(_T("目标脚本的模式匹配失败"))
)

基本错误值。

Functions

func ScriptRun

func ScriptRun(a *Actuator) (x any)

运行顶层代码。 返回值:EXIT 的返回值。

Types

type Actuator

type Actuator = ibase.Actuator

执行器引用。

type BigInt

type BigInt = instor.BigInt

大整数

type Bool

type Bool = instor.Bool

布尔类型

type Byte

type Byte = instor.Byte

字节类型

type Bytes

type Bytes = instor.Bytes

字节序列

type Dict

type Dict map[string]any

字典类型。 注:与切片类型一起被归类为集合。

type Float

type Float = instor.Float

通用浮点数

type Insted

type Insted = instor.Insted

指令信息包引用。

type Instx

type Instx = ibase.Instx

指令配置器引用。

type Int

type Int = instor.Int

通用整数

type Integer

type Integer = instor.Integer

整数类型约束

type Itemer

type Itemer = instor.Itemer

切片成员类型约束

type Leave

type Leave struct {
	Kind int // RETURN or EXIT
	Data any // 返回值
}

退出类型: - RETURN 函数内返回,结束函数执行。 - EXIT 脚本结束(视为验证通过)。 说明: 与 cease 类似,由内层panic()抛出,但携带数据用于表达返回值。

type Number

type Number = instor.Number

数值类型约束

type PubKey

type PubKey = ibase.PubKey

公钥类型引用。

type RegExp

type RegExp = instor.RegExp

正则表达式

type Rune

type Rune = instor.Rune

字符类型

type Runes

type Runes = instor.Runes

字符序列

type Script

type Script = instor.Script

脚本类型

type String

type String = instor.String

文本串

type Time

type Time = instor.Time

时间类型

type Wrapper

type Wrapper = ibase.Wrapper

调用器引用

Directories

Path Synopsis
Package expr 表达式指令的实现。
Package expr 表达式指令的实现。
Package instex 通用扩展指令(EX_INST)包。
Package instex 通用扩展指令(EX_INST)包。
Package ipriv 私有扩展区(EX_PRIV)。
Package ipriv 私有扩展区(EX_PRIV)。
Package model 模式指令的实现。
Package model 模式指令的实现。
Package mox 扩展模块(MO_X) 作为单独一个子包编码,更便于灵活定制。
Package mox 扩展模块(MO_X) 作为单独一个子包编码,更便于灵活定制。

Jump to

Keyboard shortcuts

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