Documentation ¶
Overview ¶
Package treebin contains the implementation-agnostic information about all binary operators that we support.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BinaryOpName ¶
func BinaryOpName(op BinaryOperatorSymbol) string
BinaryOpName returns the name of op.
Types ¶
type BinaryOperator ¶
type BinaryOperator struct { Symbol BinaryOperatorSymbol // IsExplicitOperator is true if OPERATOR(symbol) is used. IsExplicitOperator bool }
BinaryOperator represents a unary operator used in a BinaryExpr.
func MakeBinaryOperator ¶
func MakeBinaryOperator(symbol BinaryOperatorSymbol) BinaryOperator
MakeBinaryOperator creates a BinaryOperator given a symbol.
func (BinaryOperator) Operator ¶
func (BinaryOperator) Operator()
Operator implements tree.Operator.
func (BinaryOperator) String ¶
func (o BinaryOperator) String() string
type BinaryOperatorSymbol ¶
type BinaryOperatorSymbol uint8
BinaryOperatorSymbol is a symbol for a binary operator.
const ( Bitand BinaryOperatorSymbol = iota Bitor Bitxor Plus Minus Mult Div FloorDiv Mod Pow Concat LShift RShift JSONFetchVal JSONFetchText JSONFetchValPath JSONFetchTextPath NumBinaryOperatorSymbols )
BinaryExpr.Operator
func (BinaryOperatorSymbol) IsPadded ¶
func (i BinaryOperatorSymbol) IsPadded() bool
IsPadded returns whether the binary operator needs to be padded.
func (BinaryOperatorSymbol) String ¶
func (i BinaryOperatorSymbol) String() string
Click to show internal directories.
Click to hide internal directories.