Class: BELParser::Language::Semantics::SemanticFunction
- Inherits:
-
SemanticASTNode
- Object
- AST::Node
- SemanticASTNode
- BELParser::Language::Semantics::SemanticFunction
- Defined in:
- lib/bel_parser/language/semantics_ast.rb
Overview
AST node for Function is a semantic AST.
Instance Attribute Summary
Attributes inherited from AST::Node
Instance Method Summary collapse
-
#initialize(children = [], **properties) ⇒ SemanticFunction
constructor
A new instance of SemanticFunction.
- #match(parse_node, spec, will_match_partial = false) ⇒ Object
Methods inherited from SemanticASTNode
Methods inherited from AST::Node
#==, #append, #concat, #dup, #eql?, #inspect, #to_a, #to_ast, #to_bel, #to_s, #to_sexp, #updated
Methods included from Parsers
Constructor Details
#initialize(children = [], **properties) ⇒ SemanticFunction
Returns a new instance of SemanticFunction.
354 355 356 |
# File 'lib/bel_parser/language/semantics_ast.rb', line 354 def initialize(children = [], **properties) super(:function, children, properties) end |
Instance Method Details
#match(parse_node, spec, will_match_partial = false) ⇒ Object
358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 |
# File 'lib/bel_parser/language/semantics_ast.rb', line 358 def match(parse_node, spec, will_match_partial = false) return nil_node_warning( parse_node, spec, BELParser::Parsers::AST::Function) if parse_node.nil? if parse_node.type == type success(parse_node, spec) else type_warning( parse_node, spec, BELParser::Parsers::AST::Function, parse_node) end end |