class AdLint::Cc1::ArraySubscriptExpression

Attributes

array_subscript[R]
expression[R]

Public Class Methods

new(expr, ary_subs, left_bracket) click to toggle source
Calls superclass method AdLint::Cc1::PostfixExpression::new
# File lib/adlint/cc1/syntax.rb, line 865
def initialize(expr, ary_subs, left_bracket)
  super(left_bracket)
  @expression = expr
  @array_subscript = ary_subs
end

Public Instance Methods

arithmetic?() click to toggle source
# File lib/adlint/cc1/syntax.rb, line 882
def arithmetic?
  false
end
bitwise?() click to toggle source
# File lib/adlint/cc1/syntax.rb, line 886
def bitwise?
  false
end
have_side_effect?() click to toggle source
# File lib/adlint/cc1/syntax.rb, line 874
def have_side_effect?
  @expression.have_side_effect? || @array_subscript.have_side_effect?
end
inspect(indent = 0) click to toggle source
# File lib/adlint/cc1/syntax.rb, line 907
def inspect(indent = 0)
  " " * indent + "#{short_class_name} (#{location.inspect})\n" +
    @expression.inspect(indent + 1) + "\n" +
    @array_subscript.inspect(indent + 1)
end
logical?() click to toggle source
# File lib/adlint/cc1/syntax.rb, line 878
def logical?
  false
end
to_complemental_logical() click to toggle source
# File lib/adlint/cc1/syntax.rb, line 899
def to_complemental_logical
  self
end
to_normalized_logical(parent_expr = nil) click to toggle source
# File lib/adlint/cc1/syntax.rb, line 890
def to_normalized_logical(parent_expr = nil)
  case parent_expr
  when nil, LogicalAndExpression, LogicalOrExpression
    create_normalized_logical_of(self)
  else
    self
  end
end
to_s() click to toggle source
# File lib/adlint/cc1/syntax.rb, line 903
def to_s
  "#{@expression.to_s}[#{@array_subscript.to_s}]"
end