Sha256: b8b1655b0b083ace2f085491f86c5de43768680305d9a58900039625a81d504a

Contents?: true

Size: 721 Bytes

Versions: 5

Compression:

Stored size: 721 Bytes

Contents

# encoding: utf-8

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

5 entries across 5 versions & 1 rubygems

Version Path
antelope-0.3.2 lib/antelope/ace/scanner/third.rb
antelope-0.3.0 lib/antelope/ace/scanner/third.rb
antelope-0.2.4 lib/antelope/ace/scanner/third.rb
antelope-0.2.3 lib/antelope/ace/scanner/third.rb
antelope-0.2.2 lib/antelope/ace/scanner/third.rb