Something went wrong. Try again.
🌱 A minimal programming language and compiler. git.urbach.dev/cli/q
high-performance programming-language compiler
Something went wrong. Try again.
1234567891011121314151617package ssa_test
import ( "testing"
"git.urbach.dev/cli/q/src/ssa" "git.urbach.dev/cli/q/src/types")
func TestStruct(t *testing.T) { fn := ssa.IR{} fn.AddBlock(ssa.NewBlock("fn")) hello := []byte("Hello") pointer := fn.Append(&ssa.Bytes{Bytes: hello}) length := fn.Append(&ssa.Int{Int: len(hello)}) fn.Append(&ssa.Struct{Typ: types.String, Arguments: ssa.Arguments{pointer, length}})}