Class: AdLint::Cc1::RelationalExpression
- Inherits:
-
BinaryExpression
- Object
- SyntaxNode
- Expression
- BinaryExpression
- AdLint::Cc1::RelationalExpression
- 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
- #arithmetic? ⇒ Boolean
- #bitwise? ⇒ Boolean
- #have_side_effect? ⇒ Boolean
- #logical? ⇒ Boolean
- #to_complemental_logical ⇒ Object
- #to_normalized_logical(parent_expr = nil) ⇒ Object
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
Methods included from Visitable
Constructor Details
This class inherits a constructor from AdLint::Cc1::BinaryExpression
Instance Method Details
#arithmetic? ⇒ Boolean
1816 1817 1818 |
# File 'lib/adlint/cc1/syntax.rb', line 1816 def arithmetic? false end |
#bitwise? ⇒ Boolean
1820 1821 1822 |
# File 'lib/adlint/cc1/syntax.rb', line 1820 def bitwise? false end |
#have_side_effect? ⇒ Boolean
1808 1809 1810 |
# File 'lib/adlint/cc1/syntax.rb', line 1808 def have_side_effect? lhs_operand.have_side_effect? || rhs_operand.have_side_effect? end |
#logical? ⇒ Boolean
1812 1813 1814 |
# File 'lib/adlint/cc1/syntax.rb', line 1812 def logical? true end |
#to_complemental_logical ⇒ Object
1828 1829 1830 1831 1832 |
# File 'lib/adlint/cc1/syntax.rb', line 1828 def to_complemental_logical op = ComparisonOperator.new(@operator).for_complement.to_s op_tok = Token.new(op, op, @operator.location) RelationalExpression.new(op_tok, @lhs_operand, @rhs_operand) end |
#to_normalized_logical(parent_expr = nil) ⇒ Object
1824 1825 1826 |
# File 'lib/adlint/cc1/syntax.rb', line 1824 def to_normalized_logical(parent_expr = nil) self end |