Sha256: 11cd876ffe82fe9cf89e1bc6912fdfbb3b87af00f44332d53a6be7403f9d54a9

Contents?: true

Size: 378 Bytes

Versions: 9

Compression:

Stored size: 378 Bytes

Contents

# frozen_string_literal: true

class Code
  class Parser
    class Error < StandardError
    end

    def initialize(input)
      @input = input
    end

    def self.parse(...)
      new(...).parse
    end

    def parse
      Code.parse(input)
    rescue Language::Parser::NotEndOfInput => e
      raise Error, e.message
    end

    private

    attr_reader :input
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
code-ruby-0.7.0 lib/code/parser.rb
code-ruby-0.6.7 lib/code/parser.rb
code-ruby-0.6.6 lib/code/parser.rb
code-ruby-0.6.5 lib/code/parser.rb
code-ruby-0.6.4 lib/code/parser.rb
code-ruby-0.6.3 lib/code/parser.rb
code-ruby-0.6.2 lib/code/parser.rb
code-ruby-0.6.1 lib/code/parser.rb
code-ruby-0.6.0 lib/code/parser.rb