Class: Foxtail::Syntax::Parser::AST::CallArguments

Inherits:
SyntaxNode show all
Defined in:
lib/foxtail/syntax/parser/ast/call_arguments.rb

Overview

Represents function call arguments (both positional and named)

Instance Attribute Summary collapse

Attributes inherited from SyntaxNode

#span

Attributes inherited from BaseNode

#type

Instance Method Summary collapse

Methods inherited from SyntaxNode

#add_span

Methods inherited from BaseNode

#==, #accept, #to_h

Constructor Details

#initialize(positional = [], named = []) ⇒ CallArguments

Returns a new instance of CallArguments.



12
13
14
15
16
# File 'lib/foxtail/syntax/parser/ast/call_arguments.rb', line 12

def initialize(positional=[], named=[])
  super()
  @positional = positional
  @named = named
end

Instance Attribute Details

#namedObject

Returns the value of attribute named.



10
11
12
# File 'lib/foxtail/syntax/parser/ast/call_arguments.rb', line 10

def named
  @named
end

#positionalObject

Returns the value of attribute positional.



9
10
11
# File 'lib/foxtail/syntax/parser/ast/call_arguments.rb', line 9

def positional
  @positional
end

Instance Method Details

#childrenObject



18
# File 'lib/foxtail/syntax/parser/ast/call_arguments.rb', line 18

def children = [*positional, *named]