Class: Foxtail::Syntax::Parser::AST::FunctionReference
- Inherits:
-
SyntaxNode
- Object
- BaseNode
- SyntaxNode
- Foxtail::Syntax::Parser::AST::FunctionReference
- Defined in:
- lib/foxtail/syntax/parser/ast/function_reference.rb
Overview
Represents function calls with optional arguments
Instance Attribute Summary collapse
-
#arguments ⇒ Object
Returns the value of attribute arguments.
-
#id ⇒ Object
Returns the value of attribute id.
Attributes inherited from SyntaxNode
Attributes inherited from BaseNode
Instance Method Summary collapse
- #children ⇒ Object
-
#initialize(id, arguments = nil) ⇒ FunctionReference
constructor
A new instance of FunctionReference.
Methods inherited from SyntaxNode
Methods inherited from BaseNode
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
#arguments ⇒ Object
Returns the value of attribute arguments.
10 11 12 |
# File 'lib/foxtail/syntax/parser/ast/function_reference.rb', line 10 def arguments @arguments end |
#id ⇒ Object
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
#children ⇒ Object
18 |
# File 'lib/foxtail/syntax/parser/ast/function_reference.rb', line 18 def children = [id, arguments].compact |