Class: BELParser::Language::Semantics::SemanticIsNil
- Inherits:
-
SemanticASTNode
- Object
- AST::Node
- SemanticASTNode
- BELParser::Language::Semantics::SemanticIsNil
- Defined in:
- lib/bel_parser/language/semantics_ast.rb
Overview
AST node for Nil is a semantic AST.
Instance Attribute Summary
Attributes inherited from AST::Node
Instance Method Summary collapse
-
#initialize(**properties) ⇒ SemanticIsNil
constructor
A new instance of SemanticIsNil.
- #match(parse_node, spec) ⇒ Object
- #terminal? ⇒ Boolean
Methods inherited from AST::Node
#==, #append, #concat, #dup, #eql?, #inspect, #to_a, #to_ast, #to_sexp, #updated
Constructor Details
#initialize(**properties) ⇒ SemanticIsNil
Returns a new instance of SemanticIsNil.
495 496 497 |
# File 'lib/bel_parser/language/semantics_ast.rb', line 495 def initialize(**properties) super(:is_nil, [], properties) end |
Instance Method Details
#match(parse_node, spec) ⇒ Object
503 504 505 506 507 508 509 |
# File 'lib/bel_parser/language/semantics_ast.rb', line 503 def match(parse_node, spec) if parse_node.nil? success(parse_node, spec) else not_nil_node_warning(parse_node, spec) end end |
#terminal? ⇒ Boolean
499 500 501 |
# File 'lib/bel_parser/language/semantics_ast.rb', line 499 def terminal? true end |