External/Tools/AS2API/api_loader.rb
# TODO: this structure sucks; responsibility for type resolution should be
#       entirely seperate from aggregation, not shoe-horned into this class
this structure sucks; responsibility for type resolution should be
entirely seperate from aggregation, not shoe-horned into this class
this structure sucks ; responsibility for type resolution should be entirely seperate from aggregation not shoe - horned into this class
def import_types_into_namespace(type, local_namespace)
    importer = type.import_manager
    importer.each_type do |type_name|
      import_type = local_namespace[type_name.join(".")]
      import_type = maybe_parse_external_definition(TypeProxy.new(type, type_name.join('.'))) unless import_type
      if import_type
	local_namespace[type_name.last.body] = import_type
      else
	$stderr.puts "#{type.input_filename}:#{type_name.first.lineno}: Couldn't resolve import of #{type_name.join(".").inspect}"
      end
    end
  end
def import_types_into_namespace ( type , local_namespace ) importer = type . import_manager importer . each_type do | type_name | import_type = local_namespace [ type_name . join ( "." ) ] import_type = maybe_parse_external_definition ( TypeProxy . new ( type , type_name . join ( '.' ) ) ) unless import_type if import_type local_namespace [ type_name . last . body ] = import_type else $stderr . puts "#{type.input_filename}:#{type_name.first.lineno}: Couldn't resolve import of #{type_name.join(".").inspect}" end end end
TODO: this structure sucks; responsibility for type resolution should be
entirely seperate from aggregation, not shoe-horned into this class
TODO : this structure sucks ; responsibility for type resolution should be entirely seperate from aggregation not shoe - horned into this class
type
<not_specific>
local_namespace
<not_specific>