Class: AdLint::Cc1::EqualityExpression

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)


1844
1845
1846
# File 'lib/adlint/cc1/syntax.rb', line 1844

def arithmetic?
  false
end

#bitwise?Boolean

Returns:

  • (Boolean)


1848
1849
1850
# File 'lib/adlint/cc1/syntax.rb', line 1848

def bitwise?
  false
end

#have_side_effect?Boolean

Returns:

  • (Boolean)


1836
1837
1838
# File 'lib/adlint/cc1/syntax.rb', line 1836

def have_side_effect?
  lhs_operand.have_side_effect? || rhs_operand.have_side_effect?
end

#logical?Boolean

Returns:

  • (Boolean)


1840
1841
1842
# File 'lib/adlint/cc1/syntax.rb', line 1840

def logical?
  true
end

#to_complemental_logicalObject



1856
1857
1858
1859
1860
# File 'lib/adlint/cc1/syntax.rb', line 1856

def to_complemental_logical
  op = ComparisonOperator.new(@operator).for_complement.to_s
  op_tok = Token.new(op, op, @operator.location)
  EqualityExpression.new(op_tok, @lhs_operand, @rhs_operand)
end

#to_normalized_logical(parent_expr = nil) ⇒ Object



1852
1853
1854
# File 'lib/adlint/cc1/syntax.rb', line 1852

def to_normalized_logical(parent_expr = nil)
  self
end