Sha256: 13f0332b1507323f529ab40af79d25399f21bc7f92bb1a924010df91aa1f7607

Contents?: true

Size: 571 Bytes

Versions: 111

Compression:

Stored size: 571 Bytes

Contents

require 'bel_parser/parsers/ast/node'
require_relative 'semantics_warning'

module BELParser
  module Language
    module Semantics
      class SemanticsTypeWarning < SemanticsWarning
        attr_reader :expected_type, :actual_type

        def initialize(expression_node, expected_type, actual_type, spec)
          super(expression_node, spec)
          @expected_type = expected_type
          @actual_type   = actual_type
        end

        def to_s
          %(Expected #{expected_type} type, but saw #{actual_type} type.)
        end
      end
    end
  end
end

Version data entries

111 entries across 111 versions & 1 rubygems

Version Path
bel_parser-1.0.0.alpha.56 lib/bel_parser/language/semantics_type_warning.rb
bel_parser-1.0.0.alpha.55-java lib/bel_parser/language/semantics_type_warning.rb
bel_parser-1.0.0.alpha.55 lib/bel_parser/language/semantics_type_warning.rb
bel_parser-1.0.0.alpha.54-java lib/bel_parser/language/semantics_type_warning.rb
bel_parser-1.0.0.alpha.54 lib/bel_parser/language/semantics_type_warning.rb
bel_parser-1.0.0.alpha.53-java lib/bel_parser/language/semantics_type_warning.rb
bel_parser-1.0.0.alpha.53 lib/bel_parser/language/semantics_type_warning.rb
bel_parser-1.0.0.alpha.52-java lib/bel_parser/language/semantics_type_warning.rb
bel_parser-1.0.0.alpha.52 lib/bel_parser/language/semantics_type_warning.rb
bel_parser-1.0.0.alpha.51-java lib/bel_parser/language/semantics_type_warning.rb
bel_parser-1.0.0.alpha.51 lib/bel_parser/language/semantics_type_warning.rb
bel_parser-1.0.0.alpha.50-java lib/bel_parser/language/semantics_type_warning.rb
bel_parser-1.0.0.alpha.50 lib/bel_parser/language/semantics_type_warning.rb
bel_parser-1.0.0.alpha.49-java lib/bel_parser/language/semantics_type_warning.rb
bel_parser-1.0.0.alpha.49 lib/bel_parser/language/semantics_type_warning.rb
bel_parser-1.0.0.alpha.48-java lib/bel_parser/language/semantics_type_warning.rb
bel_parser-1.0.0.alpha.48 lib/bel_parser/language/semantics_type_warning.rb
bel_parser-1.0.0.alpha.47-java lib/bel_parser/language/semantics_type_warning.rb
bel_parser-1.0.0.alpha.47 lib/bel_parser/language/semantics_type_warning.rb
bel_parser-1.0.0.alpha.46-java lib/bel_parser/language/semantics_type_warning.rb