Class: AdLint::Cc1::LogicalAndExpression
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) ⇒ LogicalAndExpression
Returns a new instance of LogicalAndExpression.
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
|
# File 'lib/adlint/cc1/syntax.rb', line 1957
def initialize(op, lhs_operand, rhs_operand)
super
end
|
Instance Method Details
#arithmetic? ⇒ Boolean
1984
1985
1986
|
# File 'lib/adlint/cc1/syntax.rb', line 1984
def arithmetic?
false
end
|
#bitwise? ⇒ Boolean
1988
1989
1990
|
# File 'lib/adlint/cc1/syntax.rb', line 1988
def bitwise?
false
end
|
#have_side_effect? ⇒ Boolean
1976
1977
1978
|
# File 'lib/adlint/cc1/syntax.rb', line 1976
def have_side_effect?
lhs_operand.have_side_effect? || rhs_operand.have_side_effect?
end
|
#logical? ⇒ Boolean
1980
1981
1982
|
# File 'lib/adlint/cc1/syntax.rb', line 1980
def logical?
true
end
|
#to_complemental_logical ⇒ Object
1998
1999
2000
2001
2002
|
# File 'lib/adlint/cc1/syntax.rb', line 1998
def to_complemental_logical
LogicalOrExpression.new(Token.new("||", "||", @operator.location),
@lhs_operand.to_complemental_logical,
@rhs_operand.to_complemental_logical)
end
|
#to_normalized_logical(parent_expr = nil) ⇒ Object
1992
1993
1994
1995
1996
|
# File 'lib/adlint/cc1/syntax.rb', line 1992
def to_normalized_logical(parent_expr = nil)
LogicalAndExpression.new(@operator,
@lhs_operand.to_normalized_logical(self),
@rhs_operand.to_normalized_logical(self))
end
|