Files
mgmt/lang/interpret_test/TestAstFunc1/classes-polyfuncs.txtar
James Shubin 28f5b8331a lang: funcs: structs: Improve naming
These could print nicer for debugging.
2024-12-08 16:24:42 -05:00

27 lines
656 B
Plaintext

-- main.mcl --
import "fmt"
include c1([13, 42, 0, -37,])
class c1($b) {
test [fmt.printf("len is: %d", len($b)),] {} # len is 4
}
-- OUTPUT --
Edge: FuncValue -> call # fn
Edge: FuncValue -> call # fn
Edge: call -> composite: []str # 0
Edge: const: int(-37) -> composite: []int # 3
Edge: const: int(0) -> composite: []int # 2
Edge: const: int(13) -> composite: []int # 0
Edge: const: int(42) -> composite: []int # 1
Vertex: FuncValue
Vertex: FuncValue
Vertex: call
Vertex: call
Vertex: composite: []int
Vertex: composite: []str
Vertex: const: int(-37)
Vertex: const: int(0)
Vertex: const: int(13)
Vertex: const: int(42)
Vertex: const: str("len is: %d")