Class Parslet::Source
In: lib/parslet/source/line_cache.rb
lib/parslet/source.rb
Parent: Object

Wraps the input string for parslet.

Methods

Classes and Modules

Module Parslet::Source::RangeSearch
Class Parslet::Source::LineCache

Attributes

pos  [RW]  Position of the parse as a character offset into the original string. @note: Encodings…

Public Class methods

Public Instance methods

Returns how many chars remain in the input.

Consumes n characters from the input, returning them as a slice of the input.

Returns a <line, column> tuple for the given position. If no position is given, line/column information is returned for the current position given by pos.

match(pattern)

Alias for matches?

Checks if the given pattern matches at the current input position.

@param pattern [Regexp, String] pattern to check for @return [Boolean] true if the pattern matches at pos

[Validate]