Ai
1 Star 0 Fork 0

yfmps/gopherlua-debugger

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
types.go 1.30 KB
一键复制 编辑 原始数据 按行查看 历史
杨东峰 提交于 2019-11-05 23:08 +08:00 . import fix
package lua_debugger
import (
"github.com/edolphin-ydf/gopherlua-debugger/proto"
lua "github.com/yuin/gopher-lua"
)
const (
Lua_HookCall = iota
Lua_HookRet
Lua_HookLine
Lua_HookCount
)
const (
LUA_TNONE = iota - 1
LUA_TNIL
LUA_TBOOLEAN
LUA_TLIGHTUSERDATA
LUA_TNUMBER
LUA_TSTRING
LUA_TTABLE
LUA_TFUNCTION
LUA_TUSERDATA
LUA_TTHREAD
)
type Ar struct {
lua.Debug
Event int
}
type BreakPoint struct {
File string
Condition string
PathParts []string
Line int
}
type Variable struct {
Name string
NameType int
Value string
ValueType int
ValueTypeName string
Children []*Variable
CacheId int
}
func (v *Variable) toProto() *proto.Variable {
res := &proto.Variable{
Name: v.Name,
NameType: v.NameType,
Value: v.Value,
ValueType: v.ValueType,
ValueTypeName: v.ValueTypeName,
}
for _, c := range v.Children {
res.Children = append(res.Children, c.toProto())
}
return res
}
type Stack struct {
File string
FunctionName string
Level int
Line int
LocalVariables []*Variable
UpvalueVariables []*Variable
}
type EvalContext struct {
Expr string
Error string
Seq int
StackLevel int
Depth int
CacheId int
Result *Variable
Success bool
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/yfmps/gopherlua-debugger.git
git@gitee.com:yfmps/gopherlua-debugger.git
yfmps
gopherlua-debugger
gopherlua-debugger
v0.0.5

搜索帮助