Class: AdLint::Cc1::AndExpression

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)


1872
1873
1874
# File 'lib/adlint/cc1/syntax.rb', line 1872

def arithmetic?
  false
end

#bitwise?Boolean

Returns:

  • (Boolean)


1876
1877
1878
# File 'lib/adlint/cc1/syntax.rb', line 1876

def bitwise?
  true
end

#have_side_effect?Boolean

Returns:

  • (Boolean)


1864
1865
1866
# File 'lib/adlint/cc1/syntax.rb', line 1864

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

#logical?Boolean

Returns:

  • (Boolean)


1868
1869
1870
# File 'lib/adlint/cc1/syntax.rb', line 1868

def logical?
  false
end

#to_complemental_logicalObject



1889
1890
1891
# File 'lib/adlint/cc1/syntax.rb', line 1889

def to_complemental_logical
  self
end

#to_normalized_logical(parent_expr = nil) ⇒ Object



1880
1881
1882
1883
1884
1885
1886
1887
# File 'lib/adlint/cc1/syntax.rb', line 1880

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