Class: BELParser::Language::Semantics::SemanticArgument
- Inherits:
-
SemanticASTNode
- Object
- AST::Node
- SemanticASTNode
- BELParser::Language::Semantics::SemanticArgument
- Defined in:
- lib/bel_parser/language/semantics_ast.rb
Overview
AST node for Argument is a semantic AST.
Instance Attribute Summary
Attributes inherited from AST::Node
Instance Method Summary collapse
-
#initialize(children = [], **properties) ⇒ SemanticArgument
constructor
A new instance of SemanticArgument.
- #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) ⇒ SemanticArgument
Returns a new instance of SemanticArgument.
378 379 380 |
# File 'lib/bel_parser/language/semantics_ast.rb', line 378 def initialize(children = [], **properties) super(:argument, children, properties) end |
Instance Method Details
#match(parse_node, spec, will_match_partial = false) ⇒ Object
382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 |
# File 'lib/bel_parser/language/semantics_ast.rb', line 382 def match(parse_node, spec, will_match_partial = false) return nil_node_warning( parse_node, spec, BELParser::Parsers::AST::Argument) if parse_node.nil? if parse_node.type == type success(parse_node, spec) else type_warning( parse_node, spec, BELParser::Parsers::AST::Argument, parse_node) end end |