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.
123456789101112131415161718192021222324252627282930313233343536373839package ssa
import ( "fmt"
"git.urbach.dev/cli/q/src/token" "git.urbach.dev/cli/q/src/types")
// Parameter is an input parameter for a function call.type Parameter struct { Typ types.Type Name string Tokens token.List Independent Liveness Source Index uint8}
// Equals returns true if the parameters are equal.func (a *Parameter) Equals(v Value) bool { b, sameType := v.(*Parameter)
if !sameType { return false }
return a.Index == b.Index}
// IsPure returns true because a parameter is always constant.func (p *Parameter) IsPure() bool { return true }
// String returns a human-readable representation of the parameter.func (p *Parameter) String() string { return fmt.Sprintf("args[%d]", p.Index) }
// Type returns the type of the parameter.func (p *Parameter) Type() types.Type { return p.Typ }