Documentation
¶
Overview ¶
Package ast provides internal helpers related to AST nodes and ancillary structures.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Precedence ¶
type Precedence int
const ( MinPrecedence Precedence = 1 // Var, Self, Parens, literals ApplyPrecedence Precedence = 2 // ast.Function calls and indexing. UnaryPrecedence Precedence = 4 // Logical and bitwise negation, unary + - MaxPrecedence Precedence = 16 // ast.Local, If, ast.Import, ast.Function, Error )
func BinaryOpPrecedence ¶
func BinaryOpPrecedence(bop ast.BinaryOp) Precedence
func ExprPrecedence ¶
func ExprPrecedence(node ast.Node) Precedence
ExprPrecedence gives the precedence level of an operation, so that it can be correctly parsed and unparsed/formatted.
func TighterPrecedence ¶
func TighterPrecedence(p Precedence) Precedence
Click to show internal directories.
Click to hide internal directories.