1 Star 0 Fork 1

landy/qlang

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
goroutine2.go 732 Bytes
一键复制 编辑 原始数据 按行查看 历史
xushiwei 提交于 2016-05-28 19:58 +08:00 . #96 builtin make function: support chan
package qlang
import (
"qiniupkg.com/text/tpl.v1/interpreter.util"
"qlang.io/exec.v2"
)
// -----------------------------------------------------------------------------
func (p *Compiler) fnGo(e interpreter.Engine) {
src, _ := p.gstk.Pop()
instr := p.code.Reserve()
p.exits = append(p.exits, func() {
start, end := p.cl(e, "expr", src)
instr.Set(exec.Go(start, end))
})
}
// -----------------------------------------------------------------------------
func (p *Compiler) chanIn() {
p.code.Block(exec.ChanIn)
}
func (p *Compiler) chanOut() {
p.code.Block(exec.ChanOut)
}
func (p *Compiler) tChan() {
p.code.Block(exec.Chan)
}
// -----------------------------------------------------------------------------
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/landylee007/qlang.git
git@gitee.com:landylee007/qlang.git
landylee007
qlang
qlang
v2.9.60

搜索帮助