Sha256: db4ea35a4ca82f13e159b3fd20679191928c55c896b9995e008ebb35eede0f2a

Contents?: true

Size: 1.18 KB

Versions: 44

Compression:

Stored size: 1.18 KB

Contents

# frozen_string_literal: true

module Loxxy
  module BackEnd
    # Mix-in module that implements the expected common behaviour of entries
    # placed in the symbol table.
    module Entry
      # @return [String] User-defined name of the entry.
      attr_reader :name

=begin
      # @return [String] Suffix for building the internal name of the entry.
      attr_accessor :suffix
=end

      # Initialize the entry with given name
      # @param aName [String] The name of the entry
      def init_name(aName)
        @name = aName.dup
        @name.freeze
      end
=begin
      # Return the internal name of the entry
      # Internal names used to disambiguate entry names.
      # There might be homonyns between variable because:
      #   - A child Scope may have a entry with same name as one of its
      #     ancestor(s).
      #   - Multiple calls to same defrel or procedure may imply multiple creation
      #     of a entry given name...
      # @return [String] internal name
      def i_name
        if suffix =~ /^_/
          label + suffix
        else
          (suffix.nil? || suffix.empty?) ? label : suffix
        end
      end
=end
    end # module
  end # module
end # module

Version data entries

44 entries across 44 versions & 1 rubygems

Version Path
loxxy-0.1.17 lib/loxxy/back_end/entry.rb
loxxy-0.1.16 lib/loxxy/back_end/entry.rb
loxxy-0.1.15 lib/loxxy/back_end/entry.rb
loxxy-0.1.14 lib/loxxy/back_end/entry.rb
loxxy-0.1.13 lib/loxxy/back_end/entry.rb
loxxy-0.1.12 lib/loxxy/back_end/entry.rb
loxxy-0.1.11 lib/loxxy/back_end/entry.rb
loxxy-0.1.10 lib/loxxy/back_end/entry.rb
loxxy-0.1.09 lib/loxxy/back_end/entry.rb
loxxy-0.1.08 lib/loxxy/back_end/entry.rb
loxxy-0.1.07 lib/loxxy/back_end/entry.rb
loxxy-0.1.06 lib/loxxy/back_end/entry.rb
loxxy-0.1.05 lib/loxxy/back_end/entry.rb
loxxy-0.1.04 lib/loxxy/back_end/entry.rb
loxxy-0.1.03 lib/loxxy/back_end/entry.rb
loxxy-0.1.02 lib/loxxy/back_end/entry.rb
loxxy-0.1.01 lib/loxxy/back_end/entry.rb
loxxy-0.1.0 lib/loxxy/back_end/entry.rb
loxxy-0.0.28 lib/loxxy/back_end/entry.rb
loxxy-0.0.27 lib/loxxy/back_end/entry.rb