Class: AdLint::Cc1::LogicalOrExpression
Instance Attribute Summary
#lhs_operand, #operator, #rhs_operand
Attributes inherited from SyntaxNode
#head_token, #subsequent_sequence_point, #tail_token
Instance Method Summary
collapse
#inspect, #location, #to_s
Methods inherited from Expression
#constant?, #full=, #object_specifiers, #to_s
Methods inherited from SyntaxNode
#head_location, #inspect, #location, #short_class_name, #tail_location
#analysis_target?
Methods included from Visitable
#accept
Constructor Details
#initialize(op, lhs_operand, rhs_operand) ⇒ LogicalOrExpression
Returns a new instance of LogicalOrExpression.
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
|
# File 'lib/adlint/cc1/syntax.rb', line 2006
def initialize(op, lhs_operand, rhs_operand)
super
end
|
Instance Method Details
#arithmetic? ⇒ Boolean
2033
2034
2035
|
# File 'lib/adlint/cc1/syntax.rb', line 2033
def arithmetic?
false
end
|
#bitwise? ⇒ Boolean
2037
2038
2039
|
# File 'lib/adlint/cc1/syntax.rb', line 2037
def bitwise?
false
end
|
#have_side_effect? ⇒ Boolean
2025
2026
2027
|
# File 'lib/adlint/cc1/syntax.rb', line 2025
def have_side_effect?
lhs_operand.have_side_effect? || rhs_operand.have_side_effect?
end
|
#logical? ⇒ Boolean
2029
2030
2031
|
# File 'lib/adlint/cc1/syntax.rb', line 2029
def logical?
true
end
|
#to_complemental_logical ⇒ Object
2047
2048
2049
2050
2051
|
# File 'lib/adlint/cc1/syntax.rb', line 2047
def to_complemental_logical
LogicalAndExpression.new(Token.new("&&", "&&", @operator.location),
@lhs_operand.to_complemental_logical,
@rhs_operand.to_complemental_logical)
end
|
#to_normalized_logical(parent_expr = nil) ⇒ Object
2041
2042
2043
2044
2045
|
# File 'lib/adlint/cc1/syntax.rb', line 2041
def to_normalized_logical(parent_expr = nil)
LogicalOrExpression.new(@operator,
@lhs_operand.to_normalized_logical(self),
@rhs_operand.to_normalized_logical(self))
end
|