Class: AdLint::Cc1::FunctionCallExpression
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 FunctionCallExpression.
915
916
917
918
919
|
# File 'lib/adlint/cc1/syntax.rb', line 915
def initialize(expr, arg_exprs, left_paren)
super(left_paren)
@expression = expr
@argument_expressions = arg_exprs
end
|
Instance Attribute Details
#argument_expressions ⇒ Object
Returns the value of attribute argument_expressions.
922
923
924
|
# File 'lib/adlint/cc1/syntax.rb', line 922
def argument_expressions
@argument_expressions
end
|
#expression ⇒ Object
Returns the value of attribute expression.
921
922
923
|
# File 'lib/adlint/cc1/syntax.rb', line 921
def expression
@expression
end
|
Instance Method Details
#arithmetic? ⇒ Boolean
932
933
934
|
# File 'lib/adlint/cc1/syntax.rb', line 932
def arithmetic?
false
end
|
#bitwise? ⇒ Boolean
936
937
938
|
# File 'lib/adlint/cc1/syntax.rb', line 936
def bitwise?
false
end
|
#have_side_effect? ⇒ Boolean
924
925
926
|
# File 'lib/adlint/cc1/syntax.rb', line 924
def have_side_effect?
true
end
|
#inspect(indent = 0) ⇒ Object
958
959
960
961
962
|
# File 'lib/adlint/cc1/syntax.rb', line 958
def inspect(indent = 0)
([" " * indent + "#{short_class_name} (#{location.inspect})"] +
[@expression.inspect(indent + 1)] +
@argument_expressions.map { |a| a.inspect(indent + 1) }).join("\n")
end
|
#logical? ⇒ Boolean
928
929
930
|
# File 'lib/adlint/cc1/syntax.rb', line 928
def logical?
false
end
|
#to_complemental_logical ⇒ Object
949
950
951
|
# File 'lib/adlint/cc1/syntax.rb', line 949
def to_complemental_logical
self
end
|
#to_normalized_logical(parent_expr = nil) ⇒ Object
940
941
942
943
944
945
946
947
|
# File 'lib/adlint/cc1/syntax.rb', line 940
def to_normalized_logical(parent_expr = nil)
case parent_expr
when nil, LogicalAndExpression, LogicalOrExpression
create_normalized_logical_of(self)
else
self
end
end
|
953
954
955
956
|
# File 'lib/adlint/cc1/syntax.rb', line 953
def to_s
"#{@expression.to_s}(" +
@argument_expressions.map { |expr| expr.to_s }.join(",") + ")"
end
|