Sha256: 2993f1fd622c9052ce5d6b9879744ac68d20ed8a4819cd29eb9d087dcbfdc4fc

Contents?: true

Size: 843 Bytes

Versions: 24

Compression:

Stored size: 843 Bytes

Contents

# frozen_string_literal: true

require 'rley'

module Loxxy
  module FrontEnd
    # The superclass for all tokens that have a data value.
    class Literal < Rley::Lexical::Token
      # @return [Datatype] The value expressed in one of the Lox datatype.
      attr_reader :value

      # Constructor.
      # @param aValue [Datatype::BuiltinDatatype] the Lox data value
      # @param theLexeme [String] the lexeme (= piece of text from input)
      # @param aTerminal [Rley::Syntax::Terminal, String]
      #   The terminal symbol corresponding to the lexeme.
      # @param aPosition [Rley::Lexical::Position] The position of lexeme
      #   in input text.
      def initialize(aValue, aLexeme, aTerminal, aPosition)
        super(aLexeme, aTerminal, aPosition)
        @value = aValue
      end
    end # class
  end # module
end # module

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
loxxy-0.0.28 lib/loxxy/front_end/literal.rb
loxxy-0.0.27 lib/loxxy/front_end/literal.rb
loxxy-0.0.26 lib/loxxy/front_end/literal.rb
loxxy-0.0.25 lib/loxxy/front_end/literal.rb
loxxy-0.0.24 lib/loxxy/front_end/literal.rb
loxxy-0.0.23 lib/loxxy/front_end/literal.rb
loxxy-0.0.22 lib/loxxy/front_end/literal.rb
loxxy-0.0.21 lib/loxxy/front_end/literal.rb
loxxy-0.0.20 lib/loxxy/front_end/literal.rb
loxxy-0.0.19 lib/loxxy/front_end/literal.rb
loxxy-0.0.18 lib/loxxy/front_end/literal.rb
loxxy-0.0.17 lib/loxxy/front_end/literal.rb
loxxy-0.0.16 lib/loxxy/front_end/literal.rb
loxxy-0.0.15 lib/loxxy/front_end/literal.rb
loxxy-0.0.14 lib/loxxy/front_end/literal.rb
loxxy-0.0.13 lib/loxxy/front_end/literal.rb
loxxy-0.0.12 lib/loxxy/front_end/literal.rb
loxxy-0.0.11 lib/loxxy/front_end/literal.rb
loxxy-0.0.10 lib/loxxy/front_end/literal.rb
loxxy-0.0.9 lib/loxxy/front_end/literal.rb