Sha256: 4104f38d530a5d349ddeab60e43ca691359713c21682dc01e9e02df68be3b311

Contents?: true

Size: 439 Bytes

Versions: 1

Compression:

Stored size: 439 Bytes

Contents

# encoding: utf-8
# frozen_string_literal: true

module Carbon
  module Compiler
    class Directive
      module Import
        Directive.handle :import do
          error_excessive_parameters(node, 1) if @node.parameters.size != 1
          etype = @node.parameters.first
          error_invalid_parameter(etype) unless etype.is_a?(Node::EType)
          @file.aliases.merge!(etype.expand(@file))
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
carbon-compiler-0.2.0 lib/carbon/compiler/directive/import.rb