SourceFragment
Represents any source cursor other than the root cursor and it is mandated by some APIs that solely deal with recursive parsing where the root input will never be used as the source for the parser.
Attributes
- Graph
- Supertypes
- Known subtypes
Members list
Type members
Types
Value members
Inherited methods
Indicates whether this contexts offset is behind the last character of the input string
Indicates whether this contexts offset is behind the last character of the input string
Attributes
- Inherited from:
- SourceCursor
Captures a string containing the specified number of characters from the current offset. If the number of remaining characters is less than the specified number, all remaining characters will be returned.
Captures a string containing the specified number of characters from the current offset. If the number of remaining characters is less than the specified number, all remaining characters will be returned.
Attributes
- Inherited from:
- SourceCursor
The character at the current offset.
The character at the specified offset, relative from the current offset.
The character at the specified offset, relative from the current offset.
Attributes
- Inherited from:
- SourceCursor
Consumes the specified number of characters, returning a new SourceCursor
with the new offset.
Consumes the specified number of characters, returning a new SourceCursor
with the new offset.
Attributes
- Inherited from:
- SourceCursor
The full input string, containing the string portions before and after the current offset.
The full input string, containing the string portions before and after the current offset.
Attributes
- Inherited from:
- SourceCursor
The length of the input of this cursor.
The nest level of this cursor in case of recursive parsing.
Create a new instance of this cursor with the nestLevel incremented.
Create a new instance of this cursor with the nestLevel incremented.
Attributes
- Inherited from:
- SourceCursor
The offset of this cursor from the start of the source.
The (virtual) path of the document this input originates from; may be empty in case of generated sources.
The (virtual) path of the document this input originates from; may be empty in case of generated sources.
Attributes
- Inherited from:
- SourceCursor
The current position in the input string.
Indicates the number of characters remaining in the input string after the current offset.
Indicates the number of characters remaining in the input string after the current offset.
Attributes
- Inherited from:
- SourceCursor
Returns a new SourceCursor
with the input string being reversed,
but pointing to the same character as this context.
Returns a new SourceCursor
with the input string being reversed,
but pointing to the same character as this context.
This is a low-level optimization for parsers that look for strings like email addresses where the first character
is not significant, so that parsing backwards from any @
encountered in the input provided better performance.
Attributes
- Inherited from:
- SourceCursor
The source for the root input, positioned to match the offset of this (potentially nested) source.
The source for the root input, positioned to match the offset of this (potentially nested) source.
Attributes
- Inherited from:
- SourceCursor