Sha256: 28bbd39b8714e133bf5339fd061daff16ac40e71e5a99d4bee89eccef469d45d

Contents?: true

Size: 618 Bytes

Versions: 3

Compression:

Stored size: 618 Bytes

Contents

# encoding: utf-8
# frozen_string_literal: true

require "yoga"
require "brandish/parser/main"
require "brandish/parser/node"

module Brandish
  # Parses the document into a tree of nodes.  This is strictly an LL(0)
  # recursive descent parser - even though the term `peek` is used, this is
  # technically a shifted token that is acted upon.
  #
  # This constructs a tree that can then be walked or modified to construct
  # an end product.
  class Parser
    include Yoga::Parser
    include Parser::Main

    def initialize(*)
      super
    end

    undef_method :peek_out
    undef_method :peek_out?
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
brandish-0.1.3 lib/brandish/parser.rb
brandish-0.1.2 lib/brandish/parser.rb
brandish-0.1.1 lib/brandish/parser.rb