Class: AdLint::Cc1::PostfixIncrementExpression
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 PostfixIncrementExpression.
1162
1163
1164
1165
|
# File 'lib/adlint/cc1/syntax.rb', line 1162
def initialize(op, ope)
super(op)
@operand = ope
end
|
Instance Attribute Details
Returns the value of attribute operand.
1167
1168
1169
|
# File 'lib/adlint/cc1/syntax.rb', line 1167
def operand
@operand
end
|
Instance Method Details
#arithmetic? ⇒ Boolean
1177
1178
1179
|
# File 'lib/adlint/cc1/syntax.rb', line 1177
def arithmetic?
true
end
|
#bitwise? ⇒ Boolean
1181
1182
1183
|
# File 'lib/adlint/cc1/syntax.rb', line 1181
def bitwise?
false
end
|
#have_side_effect? ⇒ Boolean
1169
1170
1171
|
# File 'lib/adlint/cc1/syntax.rb', line 1169
def have_side_effect?
true
end
|
#inspect(indent = 0) ⇒ Object
1202
1203
1204
1205
|
# File 'lib/adlint/cc1/syntax.rb', line 1202
def inspect(indent = 0)
" " * indent + "#{short_class_name} (#{location.inspect}) " +
@operand.inspect
end
|
#logical? ⇒ Boolean
1173
1174
1175
|
# File 'lib/adlint/cc1/syntax.rb', line 1173
def logical?
false
end
|
#to_complemental_logical ⇒ Object
1194
1195
1196
|
# File 'lib/adlint/cc1/syntax.rb', line 1194
def to_complemental_logical
self
end
|
#to_normalized_logical(parent_expr = nil) ⇒ Object
1185
1186
1187
1188
1189
1190
1191
1192
|
# File 'lib/adlint/cc1/syntax.rb', line 1185
def to_normalized_logical(parent_expr = nil)
case parent_expr
when nil, LogicalAndExpression, LogicalOrExpression
create_normalized_logical_of(self)
else
self
end
end
|
1198
1199
1200
|
# File 'lib/adlint/cc1/syntax.rb', line 1198
def to_s
"#{@operand.to_s}++"
end
|