Class: BELParser::Parsers::AST::Term
- Defined in:
- lib/bel_parser/parsers/ast/node.rb
Overview
AST node representing a term.
Instance Attribute Summary collapse
-
#function_semantics ⇒ Object
Get the term’s function semantics.
Attributes inherited from Node
#character_range, #complete, #line_number
Attributes inherited from AST::Node
Instance Method Summary collapse
-
#arguments ⇒ Object
Get the term’s arguments.
-
#function ⇒ Object
Get the term’s function.
-
#initialize(children = [], properties = {}) ⇒ Term
constructor
New Term AST node.
Methods inherited from Node
#add_syntax_error, #append, #child, #children?, #complete?, #concat, #first_child, #fourth_child, #freeze, #incomplete?, #num_children, #range_end, #range_start, #second_child, #syntax_errors, #third_child, #traverse, #updated
Methods inherited from AST::Node
#==, #append, #concat, #dup, #eql?, #inspect, #to_a, #to_ast, #to_bel, #to_s, #to_sexp, #updated
Methods included from BELParser::Parsers
Constructor Details
#initialize(children = [], properties = {}) ⇒ Term
New Term AST node.
869 870 871 |
# File 'lib/bel_parser/parsers/ast/node.rb', line 869 def initialize(children = [], properties = {}) super(Term.ast_type, children, properties) end |
Instance Attribute Details
#function_semantics ⇒ Object
Get the term’s function semantics.
884 885 886 |
# File 'lib/bel_parser/parsers/ast/node.rb', line 884 def function_semantics @function_semantics end |
Instance Method Details
#arguments ⇒ Object
Get the term’s arguments.
879 880 881 |
# File 'lib/bel_parser/parsers/ast/node.rb', line 879 def arguments children[1..-1] end |
#function ⇒ Object
Get the term’s function.
874 875 876 |
# File 'lib/bel_parser/parsers/ast/node.rb', line 874 def function children[0] end |