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, will_match_partial = false) ⇒ Object
- #terminal? ⇒ Boolean
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) ⇒ SemanticIsNil
Returns a new instance of SemanticIsNil.
494 495 496 |
# File 'lib/bel_parser/language/semantics_ast.rb', line 494 def initialize(**properties) super(:is_nil, [], properties) end |
Instance Method Details
#match(parse_node, spec, will_match_partial = false) ⇒ Object
502 503 504 505 506 507 508 |
# File 'lib/bel_parser/language/semantics_ast.rb', line 502 def match(parse_node, spec, will_match_partial = false) if parse_node.nil? success(parse_node, spec) else not_nil_node_warning(parse_node, spec) end end |
#terminal? ⇒ Boolean
498 499 500 |
# File 'lib/bel_parser/language/semantics_ast.rb', line 498 def terminal? true end |