ast

package
v0.0.0-...-3948e75 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 15, 2020 License: BSD-3-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Add

type Add struct{ X, Y Operand }

func (Add) Inputs

func (a Add) Inputs() []Operand

func (Add) String

func (a Add) String() string

type Assignment

type Assignment struct {
	LHS Variable
	RHS Expression
}

func (Assignment) Operands

func (a Assignment) Operands() []Operand

func (Assignment) String

func (a Assignment) String() string

type Cond

type Cond struct{ X, C Variable }

func (Cond) Inputs

func (c Cond) Inputs() []Operand

func (Cond) String

func (c Cond) String() string

type Constant

type Constant uint

func (Constant) GoString

func (c Constant) GoString() string

func (Constant) Inputs

func (c Constant) Inputs() []Operand

func (Constant) String

func (c Constant) String() string

type Expression

type Expression interface {
	Inputs() []Operand
	fmt.Stringer
}

type Inv

type Inv struct{ X Operand }

func (Inv) Inputs

func (i Inv) Inputs() []Operand

func (Inv) String

func (i Inv) String() string

type Mul

type Mul struct{ X, Y Operand }

func (Mul) Inputs

func (m Mul) Inputs() []Operand

func (Mul) String

func (m Mul) String() string

type Neg

type Neg struct{ X Operand }

func (Neg) Inputs

func (n Neg) Inputs() []Operand

func (Neg) String

func (n Neg) String() string

type Operand

type Operand interface {
	fmt.Stringer
}

type Pow

type Pow struct {
	X Variable
	N Constant
}

func (Pow) Inputs

func (p Pow) Inputs() []Operand

func (Pow) String

func (p Pow) String() string

type Program

type Program struct {
	Assignments []Assignment
}

func (Program) String

func (p Program) String() string

type Sub

type Sub struct{ X, Y Operand }

func (Sub) Inputs

func (s Sub) Inputs() []Operand

func (Sub) String

func (s Sub) String() string

type Variable

type Variable string

func Variables

func Variables(operands []Operand) []Variable

func (Variable) GoString

func (v Variable) GoString() string

func (Variable) Inputs

func (v Variable) Inputs() []Operand

func (Variable) String

func (v Variable) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL