Sha256: 6f8aeee4b67df38af9e40a06ec9c0bce432325afe79cd8ff8110599c614dec9e

Contents?: true

Size: 633 Bytes

Versions: 8

Compression:

Stored size: 633 Bytes

Contents

module Xcode
  class Project
    class Config
      class IOScanner
        TOKENS = [ ?}, ?=, ?;, ?{, ?( ].freeze
        DELIMS = [ ?), ?, ].freeze

        attr_reader :term

        def initialize(io)
          @io = io
        end

        def tokenize
          @term = ''

          while c = @io.getc
            return c if TOKENS.include? c
            term << c
          end

          return nil
        end

        def delimit
          @term = ''

          while c = @io.getc
            return c if DELIMS.include? c
            term << c
          end

          return nil
        end
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
xcode-0.1.6 lib/xcode/project/config/io_scanner.rb
xcode-0.1.5 lib/xcode/project/config/io_scanner.rb
xcode-0.1.4 lib/xcode/project/config/io_scanner.rb
xcode-0.1.3 lib/xcode/project/config/io_scanner.rb
xcode-0.1.2 lib/xcode/project/config/io_scanner.rb
xcode-0.1.1 lib/xcode/project/config/io_scanner.rb
xcode-0.1.0 lib/xcode/project/config/io_scanner.rb
xcode-0.0.1 lib/xcode/project/config/io_scanner.rb