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.
12345678910111213141516171819202122232425262728293031323334353637package ssa
import ( "fmt"
"git.urbach.dev/cli/q/src/types")
// Struct is a list of values that can be addressed by name.type Struct struct { Typ types.Type Arguments Liveness Source}
// Equals returns true if the structs are equal.func (a *Struct) Equals(v Value) bool { b, sameType := v.(*Struct)
if !sameType { return false }
return a.Arguments.Equals(b.Arguments)}
// IsPure returns true because two instances using the same values are interchangeable.func (s *Struct) IsPure() bool { return true }
// String returns a human-readable representation of the struct.func (s *Struct) String() string { return fmt.Sprintf("%s{%s}", s.Typ.Name(), s.Arguments.String())}
// Type returns the type of the struct.func (s *Struct) Type() types.Type { return s.Typ }