Sha256: c660fdbac53c4ad8b08bc44a686e51974ad1cf061dea75b5877bc002680dc69e

Contents?: true

Size: 883 Bytes

Versions: 4

Compression:

Stored size: 883 Bytes

Contents

require "liquidscript/compiler/icr/expressions"
require "liquidscript/compiler/icr/functions"
require "liquidscript/compiler/icr/literals"
require "liquidscript/compiler/icr/classes"
require "liquidscript/compiler/icr/helpers"
require "liquidscript/compiler/icr/heredoc"

module Liquidscript
  module Compiler
    class ICR < Base

      include Expressions
      include Functions
      include Literals
      include Classes
      include Helpers

      # (see Base#reset!)
      def reset!
        @top         = Liquidscript::ICR::Set.new
        @top.context = Liquidscript::ICR::Context.new
        @set         = [@top]
        super
      end

      # (see Base#top)
      def top
        @set.last
      end

      # Sets the starting point for compiliation.
      #
      # @return [ICR::Code]
      def compile_start
        compile_expression
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
liquidscript-0.6.1 lib/liquidscript/compiler/icr.rb
liquidscript-0.6.0 lib/liquidscript/compiler/icr.rb
liquidscript-0.5.1 lib/liquidscript/compiler/icr.rb
liquidscript-0.5.0 lib/liquidscript/compiler/icr.rb