Class: AdLint::Cc1::MemberAccessByValueExpression
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 MemberAccessByValueExpression.
966
967
968
969
970
|
# File 'lib/adlint/cc1/syntax.rb', line 966
def initialize(expr, id, dot)
super(dot)
@expression = expr
@identifier = id
end
|
Instance Attribute Details
#expression ⇒ Object
Returns the value of attribute expression.
972
973
974
|
# File 'lib/adlint/cc1/syntax.rb', line 972
def expression
@expression
end
|
#identifier ⇒ Object
Returns the value of attribute identifier.
973
974
975
|
# File 'lib/adlint/cc1/syntax.rb', line 973
def identifier
@identifier
end
|
Instance Method Details
#arithmetic? ⇒ Boolean
983
984
985
|
# File 'lib/adlint/cc1/syntax.rb', line 983
def arithmetic?
false
end
|
#bitwise? ⇒ Boolean
987
988
989
|
# File 'lib/adlint/cc1/syntax.rb', line 987
def bitwise?
false
end
|
#have_side_effect? ⇒ Boolean
975
976
977
|
# File 'lib/adlint/cc1/syntax.rb', line 975
def have_side_effect?
@expression.have_side_effect?
end
|
#inspect(indent = 0) ⇒ Object
1008
1009
1010
1011
|
# File 'lib/adlint/cc1/syntax.rb', line 1008
def inspect(indent = 0)
" " * indent + "#{short_class_name} (#{location.inspect}) " +
"#{@expression.inspect}.#{@identifier.value}"
end
|
#logical? ⇒ Boolean
979
980
981
|
# File 'lib/adlint/cc1/syntax.rb', line 979
def logical?
false
end
|
#to_complemental_logical ⇒ Object
1000
1001
1002
|
# File 'lib/adlint/cc1/syntax.rb', line 1000
def to_complemental_logical
self
end
|
#to_normalized_logical(parent_expr = nil) ⇒ Object
991
992
993
994
995
996
997
998
|
# File 'lib/adlint/cc1/syntax.rb', line 991
def to_normalized_logical(parent_expr = nil)
case parent_expr
when nil, LogicalAndExpression, LogicalOrExpression
create_normalized_logical_of(self)
else
self
end
end
|
1004
1005
1006
|
# File 'lib/adlint/cc1/syntax.rb', line 1004
def to_s
"#{@expression.to_s}.#{@identifier.value}"
end
|