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.4.08 lib/loxxy/back_end/entry.rb
loxxy-0.4.07 lib/loxxy/back_end/entry.rb
loxxy-0.4.06 lib/loxxy/back_end/entry.rb
loxxy-0.4.05 lib/loxxy/back_end/entry.rb
loxxy-0.4.04 lib/loxxy/back_end/entry.rb
loxxy-0.4.03 lib/loxxy/back_end/entry.rb
loxxy-0.4.02 lib/loxxy/back_end/entry.rb
loxxy-0.4.01 lib/loxxy/back_end/entry.rb
loxxy-0.4.00 lib/loxxy/back_end/entry.rb
loxxy-0.3.03 lib/loxxy/back_end/entry.rb
loxxy-0.3.02 lib/loxxy/back_end/entry.rb
loxxy-0.3.01 lib/loxxy/back_end/entry.rb
loxxy-0.3.00 lib/loxxy/back_end/entry.rb
loxxy-0.2.06 lib/loxxy/back_end/entry.rb
loxxy-0.2.05 lib/loxxy/back_end/entry.rb
loxxy-0.2.04 lib/loxxy/back_end/entry.rb
loxxy-0.2.03 lib/loxxy/back_end/entry.rb
loxxy-0.2.02 lib/loxxy/back_end/entry.rb
loxxy-0.2.01 lib/loxxy/back_end/entry.rb
loxxy-0.2.00 lib/loxxy/back_end/entry.rb