github.com/mattn/anko@v0.1.10/ast/operator.go (about)

     1  package ast
     2  
     3  // Operator provides interfaces for operators.
     4  type Operator interface {
     5  	Pos
     6  }
     7  
     8  // OperatorImpl provides common implementations for Operator.
     9  type OperatorImpl struct {
    10  	PosImpl // PosImpl provide Pos() function.
    11  }
    12  
    13  // BinaryOperator provides binary operation.
    14  type BinaryOperator struct {
    15  	OperatorImpl
    16  	LHS      Expr
    17  	Operator string
    18  	RHS      Expr
    19  }
    20  
    21  // ComparisonOperator provides comparison operation.
    22  type ComparisonOperator struct {
    23  	OperatorImpl
    24  	LHS      Expr
    25  	Operator string
    26  	RHS      Expr
    27  }
    28  
    29  // AddOperator provides add operation.
    30  type AddOperator struct {
    31  	OperatorImpl
    32  	LHS      Expr
    33  	Operator string
    34  	RHS      Expr
    35  }
    36  
    37  // MultiplyOperator provides multiply operation.
    38  type MultiplyOperator struct {
    39  	OperatorImpl
    40  	LHS      Expr
    41  	Operator string
    42  	RHS      Expr
    43  }