Sha256: fe58d45299f16aaa2c227479370672a8928b99876ab36a3d24deb52f3ec0d661

Contents?: true

Size: 536 Bytes

Versions: 27

Compression:

Stored size: 536 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)
      return unless 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

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
opulent-1.8.5 lib/opulent/parser/yield.rb
opulent-1.8.4 lib/opulent/parser/yield.rb
opulent-1.8.3 lib/opulent/parser/yield.rb
opulent-1.8.2 lib/opulent/parser/yield.rb
opulent-1.8.1 lib/opulent/parser/yield.rb
opulent-1.8.0 lib/opulent/parser/yield.rb
opulent-1.7.11 lib/opulent/parser/yield.rb
opulent-1.7.10 lib/opulent/parser/yield.rb
opulent-1.7.9 lib/opulent/parser/yield.rb
opulent-1.7.8 lib/opulent/parser/yield.rb
opulent-1.7.7 lib/opulent/parser/yield.rb
opulent-1.7.6 lib/opulent/parser/yield.rb
opulent-1.7.5 lib/opulent/parser/yield.rb
opulent-1.7.4 lib/opulent/parser/yield.rb
opulent-1.7.3 lib/opulent/parser/yield.rb
opulent-1.7.2 lib/opulent/parser/yield.rb
opulent-1.7.1 lib/opulent/parser/yield.rb
opulent-1.7.0 lib/opulent/parser/yield.rb
opulent-1.6.9 lib/opulent/parser/yield.rb
opulent-1.6.8 lib/opulent/parser/yield.rb