Class: BELParser::Script::State::Unset
- Inherits:
-
Object
- Object
- BELParser::Script::State::Unset
- Extended by:
- Keyword, BELParser::Script::StateFunction
- Defined in:
- lib/bel_parser/script/state/unset.rb
Constant Summary collapse
Constants included from Keyword
Keyword::BEL_VERSION_REGEX, Keyword::BEL_VERSION_STRING, Keyword::CITATION, Keyword::CITATION_REGEX, Keyword::IMPLICIT_ANNOTATIONS, Keyword::SUPPORT, Keyword::SUPPORT_REGEX
Class Method Summary collapse
Methods included from BELParser::Script::StateFunction
Methods included from Keyword
is_bel_version?, is_citation?, is_implicit_annotation?, is_support?
Class Method Details
.consume(ast_node, script_context) ⇒ Object
16 17 18 19 20 21 22 23 24 25 |
# File 'lib/bel_parser/script/state/unset.rb', line 16 def self.consume(ast_node, script_context) return nil unless ast_node.is_a?(TARGET_NODE) name_string = ast_node.name.identifier.string_literal case name_string when /\ASTATEMENT_GROUP\Z/ handle_statement_group(script_context) else handle_annotation(name_string, script_context) end end |