Sha256: e9ec40b7050414bfa797b5ed691e811a8c175ab10a3a347dfa199e5895730beb

Contents?: true

Size: 567 Bytes

Versions: 13

Compression:

Stored size: 567 Bytes

Contents

# @Opulent
module Opulent
  # @Parser
  class Parser
    # Match a yield with a explicit or implicit target
    #
    # yield target
    #
    # @param parent [Node] Parent node to which we append the definition
    #
    def block_yield(parent, indent)
      if accept :yield
        # Consume the newline from the end of the element
        error :yield unless accept(:line_feed).strip.empty?

        # Create a new node
        yield_node = [:yield, nil, {}, [], indent]

        parent[@children] << yield_node
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
opulent-1.5.5 lib/opulent/parser/yield.rb
opulent-1.5.4 lib/opulent/parser/yield.rb
opulent-1.5.3 lib/opulent/parser/yield.rb
opulent-1.5.2 lib/opulent/parser/yield.rb
opulent-1.5.1 lib/opulent/parser/yield.rb
opulent-1.5.0 lib/opulent/parser/yield.rb
opulent-1.4.8 lib/opulent/parser/yield.rb
opulent-1.4.7 lib/opulent/parser/yield.rb
opulent-1.4.6 lib/opulent/parser/yield.rb
opulent-1.4.5 lib/opulent/parser/yield.rb
opulent-1.4.3 lib/opulent/parser/yield.rb
opulent-1.4.2 lib/opulent/parser/yield.rb
opulent-1.4.1 lib/opulent/parser/yield.rb