class AdLint::Cc1::BinaryExpression

Attributes

lhs_operand[R]
operator[R]
rhs_operand[R]

Public Class Methods

new(op, lhs_operand, rhs_operand) click to toggle source
Calls superclass method AdLint::Cc1::Expression::new
# File lib/adlint/cc1/syntax.rb, line 1689
def initialize(op, lhs_operand, rhs_operand)
  super()
  @operator = op
  @lhs_operand = lhs_operand
  @rhs_operand = rhs_operand
end

Public Instance Methods

inspect(indent = 0) click to toggle source
# File lib/adlint/cc1/syntax.rb, line 1708
def inspect(indent = 0)
  " " * indent + "#{short_class_name} (#{location.inspect}) " +
    "#{@operator.value} #{lhs_operand.inspect} #{rhs_operand.inspect}"
end
location() click to toggle source
# File lib/adlint/cc1/syntax.rb, line 1700
def location
  @operator.location
end
to_s() click to toggle source
# File lib/adlint/cc1/syntax.rb, line 1704
def to_s
  "#{@lhs_operand.to_s} #{@operator.value} #{@rhs_operand.to_s}"
end