class AdLint::Cpp::UnaryArithmeticExpression

Attributes

expression[R]

Public Class Methods

new(val, op, expr) click to toggle source
Calls superclass method AdLint::Cpp::UnaryExpression::new
# File lib/adlint/cpp/syntax.rb, line 801
def initialize(val, op, expr)
  super(val, op)
  @expression = expr
end

Public Instance Methods

inspect(indent = 0) click to toggle source
# File lib/adlint/cpp/syntax.rb, line 812
def inspect(indent = 0)
  " " * indent + "#{short_class_name} (#{operator.inspect})\n" +
    @expression.inspect(indent + 1)
end
to_s() click to toggle source
# File lib/adlint/cpp/syntax.rb, line 808
def to_s
  "#{operator.value} #{@expression.to_s}"
end