Class: BELParser::Language::Semantics::SemanticHasNamespace
- Inherits:
-
SemanticASTNode
- Object
- AST::Node
- SemanticASTNode
- BELParser::Language::Semantics::SemanticHasNamespace
- Defined in:
- lib/bel_parser/language/semantics_ast.rb
Overview
AST node for HasNamespace is a semantic AST.
Instance Attribute Summary
Attributes inherited from AST::Node
Instance Method Summary collapse
-
#initialize(**properties) ⇒ SemanticHasNamespace
constructor
A new instance of SemanticHasNamespace.
- #match(prefix, 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(**properties) ⇒ SemanticHasNamespace
Returns a new instance of SemanticHasNamespace.
556 557 558 |
# File 'lib/bel_parser/language/semantics_ast.rb', line 556 def initialize(**properties) super(:has_namespace, [], properties) end |
Instance Method Details
#match(prefix, spec, will_match_partial = false) ⇒ Object
560 561 562 563 564 565 566 |
# File 'lib/bel_parser/language/semantics_ast.rb', line 560 def match(prefix, spec, will_match_partial = false) if prefix.respond_to?(:namespace) && prefix.namespace success(prefix, spec) else missing_namespace_warning(prefix, spec) end end |