Class: BELParser::Language::Semantics::SemanticsInvalidSequencePositionWarning

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) ⇒ SemanticsInvalidSequencePositionWarning

Returns a new instance of SemanticsInvalidSequencePositionWarning.



169
170
171
# File 'lib/bel_parser/language/semantics_ast_warnings.rb', line 169

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

Instance Method Details

#to_sObject



173
174
175
176
# File 'lib/bel_parser/language/semantics_ast_warnings.rb', line 173

def to_s
  pos = @expression_node.children[0].string_literal
  %(Sequence position of "#{pos}" is not a positive number.)
end