Documentation ¶
Overview ¶
Package ast declares abstract syntax tree types for acc programs.
Index ¶
Constants ¶
View Source
const ( LowestPrec = 0 HighestPrec = 4 )
Operator precedence range.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Chain ¶
type Chain struct {
Statements []Statement
}
Chain represents a sequence of acc statements for an addition chain computation.
type Identifier ¶
type Identifier string
Identifier is a variable reference.
func (Identifier) Precedence ¶
func (Identifier) Precedence() int
Precedence of this expression type.
type Statement ¶
type Statement struct { Name Identifier Expr Expr }
Statement assigns the result of an expression to a variable.
Click to show internal directories.
Click to hide internal directories.