Sha256: 677fcac4f1a75075a55bfefd9f8c9381e9d7dec56023696a70b6edd601461339
Contents?: true
Size: 1.19 KB
Versions: 2
Compression:
Stored size: 1.19 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
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
loxxy-0.0.22 | lib/loxxy/back_end/entry.rb |
loxxy-0.0.21 | lib/loxxy/back_end/entry.rb |