Class: BELParser::Language::Semantics::SemanticsMissingNamespaceWarning

Inherits:
SemanticsWarning show all
Defined in:
lib/bel_parser/language/semantics_ast_warnings.rb

Instance Attribute Summary

Attributes inherited from SemanticsResult

#expression_node, #specification

Instance Method Summary collapse

Methods inherited from SemanticsWarning

#failure?, #success?

Methods inherited from SemanticsResult

#failure?, #msg, #success?

Constructor Details

#initialize(expression_node, spec) ⇒ SemanticsMissingNamespaceWarning

Returns a new instance of SemanticsMissingNamespaceWarning.



62
63
64
# File 'lib/bel_parser/language/semantics_ast_warnings.rb', line 62

def initialize(expression_node, spec)
  super(expression_node, spec)
end

Instance Method Details

#to_sObject



66
67
68
69
# File 'lib/bel_parser/language/semantics_ast_warnings.rb', line 66

def to_s
  prefix = @expression_node.identifier && @expression_node.identifier.string_literal
  %(Missing namespace for prefix "#{prefix}".)
end