Class: BELParser::Language::Semantics::SemanticHasEncoding
- Inherits:
-
SemanticASTNode
- Object
- AST::Node
- SemanticASTNode
- BELParser::Language::Semantics::SemanticHasEncoding
- Defined in:
- lib/bel_parser/language/semantics_ast.rb
Overview
AST node for HasEncoding is a semantic AST.
Instance Attribute Summary
Attributes inherited from AST::Node
Instance Method Summary collapse
-
#initialize(**properties) ⇒ SemanticHasEncoding
constructor
A new instance of SemanticHasEncoding.
- #match(value_node, spec) ⇒ Object
Methods inherited from SemanticASTNode
Methods inherited from AST::Node
#==, #append, #concat, #dup, #eql?, #inspect, #to_a, #to_ast, #to_sexp, #updated
Constructor Details
#initialize(**properties) ⇒ SemanticHasEncoding
Returns a new instance of SemanticHasEncoding.
595 596 597 |
# File 'lib/bel_parser/language/semantics_ast.rb', line 595 def initialize(**properties) super(:has_encoding, [], properties) end |
Instance Method Details
#match(value_node, spec) ⇒ Object
599 600 601 602 603 604 605 |
# File 'lib/bel_parser/language/semantics_ast.rb', line 599 def match(value_node, spec) if value_node.respond_to?(:encoding) && value_node.encoding success(value_node, spec) else missing_encoding_warning(value_node, spec) end end |