Class: AdLint::Cc1::InclusiveOrExpression

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)


1934
1935
1936
# File 'lib/adlint/cc1/syntax.rb', line 1934

def arithmetic?
  false
end

#bitwise?Boolean

Returns:

  • (Boolean)


1938
1939
1940
# File 'lib/adlint/cc1/syntax.rb', line 1938

def bitwise?
  true
end

#have_side_effect?Boolean

Returns:

  • (Boolean)


1926
1927
1928
# File 'lib/adlint/cc1/syntax.rb', line 1926

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

#logical?Boolean

Returns:

  • (Boolean)


1930
1931
1932
# File 'lib/adlint/cc1/syntax.rb', line 1930

def logical?
  false
end

#to_complemental_logicalObject



1951
1952
1953
# File 'lib/adlint/cc1/syntax.rb', line 1951

def to_complemental_logical
  self
end

#to_normalized_logical(parent_expr = nil) ⇒ Object



1942
1943
1944
1945
1946
1947
1948
1949
# File 'lib/adlint/cc1/syntax.rb', line 1942

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