Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

23 lines (19 sloc) 0.423 kB
# Starts a new scope in the parsing process. Please also see the #captures
# method.
#
class Parslet::Atoms::Scope < Parslet::Atoms::Base
attr_reader :block
def initialize(block)
super()
@block = block
end
def cached?
false
end
def apply(source, context, consume_all)
context.scope do
parslet = block.call
return parslet.apply(source, context, consume_all)
end
end
end
Jump to Line
Something went wrong with that request. Please try again.