class BELParser::Language::Semantics::SemanticIdentifier

AST node for Identifier is a semantic AST.

Public Class Methods

new(children = [], **properties) click to toggle source
# File lib/bel_parser/language/semantics_ast.rb, line 513
def initialize(children = [], **properties)
  super(:identifier, children, properties)
end

Public Instance Methods

match(identifier, spec, will_match_partial = false) click to toggle source
# File lib/bel_parser/language/semantics_ast.rb, line 525
def match(identifier, spec, will_match_partial = false)
  return nil_node_warning(
    identifier,
    spec,
    BELParser::Parsers::AST::Identifier) if identifier.nil?

  if identifier.type != BELParser::Parsers::AST::Identifier.ast_type
    return type_warning(
      identifier,
      spec,
      BELParser::Parsers::AST::Identifier,
      identifier)
  end

  value_patterns.map { |pattern| pattern.match(identifier, spec) }
end
terminal?() click to toggle source
# File lib/bel_parser/language/semantics_ast.rb, line 517
def terminal?
  true
end
value_patterns() click to toggle source
# File lib/bel_parser/language/semantics_ast.rb, line 521
def value_patterns
  children
end