mirror of
https://github.com/bloeys/cogo.git
synced 2025-12-29 08:58:19 +00:00
add generated files
This commit is contained in:
38
main.cogo.go
Executable file
38
main.cogo.go
Executable file
@ -0,0 +1,38 @@
|
||||
// Code generated by 'cogo'; DO NOT EDIT.
|
||||
package main
|
||||
|
||||
import "github.com/bloeys/cogo/cogo"
|
||||
|
||||
func test_cogo(c *cogo.Coroutine[int, int]) (out int) {
|
||||
switch c.State {
|
||||
case 0:
|
||||
|
||||
println("Tick 1")
|
||||
c.State++
|
||||
return 1
|
||||
case 1:
|
||||
|
||||
println("Tick 2")
|
||||
c.State++
|
||||
return 2
|
||||
case 2:
|
||||
|
||||
println("Tick 3")
|
||||
c.State++
|
||||
return 3
|
||||
case 3:
|
||||
|
||||
println("Tick 4")
|
||||
c.State++
|
||||
return 4
|
||||
case 4:
|
||||
c.State = -1
|
||||
|
||||
println("Tick before end")
|
||||
|
||||
return out
|
||||
default:
|
||||
c.State = -1
|
||||
return
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user