intexpr

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2017 License: MPL-2.0 Imports: 0 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 {
	Left, Right Expr
}

func (*Add) FeedTo

func (Expr *Add) FeedTo(consumer ExprConsumer)

type Expr

type Expr interface {
	FeedTo(cons ExprConsumer)
}

type ExprConsumer

type ExprConsumer interface {
	Lit(N int)
	Var(Name string)
	Add(Left, Right Expr)
	Sub(Left, Right Expr)
	Mul(Left, Right Expr)
}

type Lit

type Lit struct {
	N int
}

func (*Lit) FeedTo

func (Expr *Lit) FeedTo(consumer ExprConsumer)

type Mul

type Mul struct {
	Left, Right Expr
}

func (*Mul) FeedTo

func (Expr *Mul) FeedTo(consumer ExprConsumer)

type Sub

type Sub struct {
	Left, Right Expr
}

func (*Sub) FeedTo

func (Expr *Sub) FeedTo(consumer ExprConsumer)

type Var

type Var struct {
	Name string
}

func (*Var) FeedTo

func (Expr *Var) FeedTo(consumer ExprConsumer)

Jump to

Keyboard shortcuts

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