This commit is contained in:
parent
b77d876ebb
commit
ca9595d1fb
28 changed files with 179 additions and 649 deletions
|
@ -1,16 +1,23 @@
|
|||
package ssa
|
||||
|
||||
import (
|
||||
"git.urbach.dev/cli/q/src/types"
|
||||
)
|
||||
import "git.urbach.dev/cli/q/src/types"
|
||||
|
||||
type Value interface {
|
||||
Debug(bool) string
|
||||
Dependencies() []Value
|
||||
Equals(Value) bool
|
||||
ID() int
|
||||
IsConst() bool
|
||||
SetID(int)
|
||||
String() string
|
||||
// Type returns the data type.
|
||||
Type() types.Type
|
||||
|
||||
// Users returns all values that reference this value as an input.
|
||||
Users() []Value
|
||||
|
||||
// Inputs returns all values that are needed for this value to be calculated.
|
||||
Inputs() []Value
|
||||
|
||||
// Equals returns true if it's equal to the given value.
|
||||
Equals(Value) bool
|
||||
|
||||
// IsConst returns true if the calculation of the value has no side effects.
|
||||
IsConst() bool
|
||||
|
||||
// Strings returns a human-readable form of the value.
|
||||
String() string
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue