Sha256: c8925721febd4a456ca3b95cb42da37e2746c910799f6f512025c1d9f192d291

Contents?: true

Size: 675 Bytes

Versions: 3

Compression:

Stored size: 675 Bytes

Contents

module Antelope
  module Ace
    class Scanner

      # Scans the third part.  Everything after the content
      # boundry is copied directly into the output.
      module Third

        # Scans the third part.  It should start with a content
        # boundry; raises an error if it does not.  It then scans
        # until the end of the file.
        #
        # @raise [SyntaxError] if somehow there is no content
        #   boundry.
        # @return [void]
        def scan_third_part
          @scanner.scan(CONTENT_BOUNDRY) or error!

          tokens << [:third]
          tokens << [:copy, @scanner.scan(/[\s\S]+/m) || ""]
        end
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
antelope-0.1.1 lib/antelope/ace/scanner/third.rb
antelope-0.1.0 lib/antelope/ace/scanner/third.rb
antelope-0.0.1 lib/antelope/ace/scanner/third.rb