Class: BELParser::Language::Syntax::InvalidFunction
- Inherits:
-
Object
- Object
- BELParser::Language::Syntax::InvalidFunction
- Includes:
- SyntaxFunction
- Defined in:
- lib/bel_parser/language/syntax/invalid_function.rb
Overview
InvalidFunction represents a syntax error with invalid function name according to a BEL specification.
Class Method Summary collapse
Class Method Details
.map(func_node, spec, _namespaces) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/bel_parser/language/syntax/invalid_function.rb', line 13 def self.map(func_node, spec, _namespaces) return nil unless func_node.is_a?(BELParser::Parsers::AST::Function) function_name = if func_node.identifier func_node.identifier.string_literal else '' end unless spec.function(function_name.to_sym) InvalidFunctionSyntaxError.new(func_node, spec, function_name) end end |