Class: Foxtail::Syntax::Parser::AST::FunctionReference

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

Overview

Represents function calls with optional arguments

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(id, arguments = nil) ⇒ FunctionReference

Returns a new instance of FunctionReference.



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

def initialize(id, arguments=nil)
  super()
  @id = id
  @arguments = arguments
end

Instance Attribute Details

#argumentsObject

Returns the value of attribute arguments.



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

def arguments
  @arguments
end

#idObject

Returns the value of attribute id.



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

def id
  @id
end

Instance Method Details

#childrenObject



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

def children = [id, arguments].compact