Class: AdLint::Cc1::SimpleAssignmentExpression

Inherits:
BinaryExpression show all
Defined in:
lib/adlint/cc1/syntax.rb

Instance Attribute Summary

Attributes inherited from BinaryExpression

#lhs_operand, #operator, #rhs_operand

Attributes inherited from SyntaxNode

#head_token, #subsequent_sequence_point, #tail_token

Instance Method Summary collapse

Methods inherited from BinaryExpression

#initialize, #inspect, #location, #to_s

Methods inherited from Expression

#constant?, #full=, #initialize, #object_specifiers, #to_s

Methods inherited from SyntaxNode

#head_location, #initialize, #inspect, #location, #short_class_name, #tail_location

Methods included from LocationHolder

#analysis_target?

Methods included from Visitable

#accept

Constructor Details

This class inherits a constructor from AdLint::Cc1::BinaryExpression

Instance Method Details

#arithmetic?Boolean

Returns:

  • (Boolean)


2146
2147
2148
# File 'lib/adlint/cc1/syntax.rb', line 2146

def arithmetic?
  rhs_operand.arithmetic?
end

#bitwise?Boolean

Returns:

  • (Boolean)


2150
2151
2152
# File 'lib/adlint/cc1/syntax.rb', line 2150

def bitwise?
  rhs_operand.bitwise?
end

#have_side_effect?Boolean

Returns:

  • (Boolean)


2138
2139
2140
# File 'lib/adlint/cc1/syntax.rb', line 2138

def have_side_effect?
  true
end

#logical?Boolean

Returns:

  • (Boolean)


2142
2143
2144
# File 'lib/adlint/cc1/syntax.rb', line 2142

def logical?
  rhs_operand.logical?
end

#to_complemental_logicalObject



2163
2164
2165
# File 'lib/adlint/cc1/syntax.rb', line 2163

def to_complemental_logical
  self
end

#to_normalized_logical(parent_expr = nil) ⇒ Object



2154
2155
2156
2157
2158
2159
2160
2161
# File 'lib/adlint/cc1/syntax.rb', line 2154

def to_normalized_logical(parent_expr = nil)
  case parent_expr
  when nil, LogicalAndExpression, LogicalOrExpression
    create_normalized_logical_of(self)
  else
    self
  end
end