Class: AdLint::Cc1::PostfixDecrementExpression
Instance Attribute Summary collapse
#operator
Attributes inherited from SyntaxNode
#head_token, #subsequent_sequence_point, #tail_token
Instance Method Summary
collapse
#location
Methods inherited from Expression
#constant?, #full=, #object_specifiers
Methods inherited from SyntaxNode
#head_location, #location, #short_class_name, #tail_location
#analysis_target?
Methods included from Visitable
#accept
Constructor Details
Returns a new instance of PostfixDecrementExpression.
1209
1210
1211
1212
|
# File 'lib/adlint/cc1/syntax.rb', line 1209
def initialize(op, ope)
super(op)
@operand = ope
end
|
Instance Attribute Details
Returns the value of attribute operand.
1214
1215
1216
|
# File 'lib/adlint/cc1/syntax.rb', line 1214
def operand
@operand
end
|
Instance Method Details
#arithmetic? ⇒ Boolean
1224
1225
1226
|
# File 'lib/adlint/cc1/syntax.rb', line 1224
def arithmetic?
true
end
|
#bitwise? ⇒ Boolean
1228
1229
1230
|
# File 'lib/adlint/cc1/syntax.rb', line 1228
def bitwise?
false
end
|
#have_side_effect? ⇒ Boolean
1216
1217
1218
|
# File 'lib/adlint/cc1/syntax.rb', line 1216
def have_side_effect?
true
end
|
#inspect(indent = 0) ⇒ Object
1249
1250
1251
1252
|
# File 'lib/adlint/cc1/syntax.rb', line 1249
def inspect(indent = 0)
" " * indent + "#{short_class_name} (#{location.inspect}) " +
@operand.inspect
end
|
#logical? ⇒ Boolean
1220
1221
1222
|
# File 'lib/adlint/cc1/syntax.rb', line 1220
def logical?
false
end
|
#to_complemental_logical ⇒ Object
1241
1242
1243
|
# File 'lib/adlint/cc1/syntax.rb', line 1241
def to_complemental_logical
self
end
|
#to_normalized_logical(parent_expr = nil) ⇒ Object
1232
1233
1234
1235
1236
1237
1238
1239
|
# File 'lib/adlint/cc1/syntax.rb', line 1232
def to_normalized_logical(parent_expr = nil)
case parent_expr
when nil, LogicalAndExpression, LogicalOrExpression
create_normalized_logical_of(self)
else
self
end
end
|
1245
1246
1247
|
# File 'lib/adlint/cc1/syntax.rb', line 1245
def to_s
"#{@operand.to_s}--"
end
|