sdpc.primitives

Common primitives used across this library

Members

Aliases

Unit
alias Unit = byte[0]

The unit type

Classes

Cache
class Cache(R, Allocator = GCAllocator)
Undocumented in source.

Functions

save
inout(R)[] save(inout(R[]) i)
Undocumented in source. Be warned that the author may not have intended to support it.
with_position
auto with_position(R i)
Undocumented in source. Be warned that the author may not have intended to support it.

Imports

empty (from std.range.primitives)
public import std.range.primitives : popFront, front, empty;
Undocumented in source.
front (from std.range.primitives)
public import std.range.primitives : popFront, front, empty;
Undocumented in source.
popFront (from std.range.primitives)
public import std.range.primitives : popFront, front, empty;
Undocumented in source.

Interfaces

ICache
interface ICache(R)
Undocumented in source.

Structs

PositionRange
struct PositionRange(R)

Keep track of line and column

PositionRangeNonWhite
struct PositionRangeNonWhite(R)
Undocumented in source.
Span
struct Span
Undocumented in source.

Templates

ParserReturnTypes
template ParserReturnTypes(R, T...)

Get the return types of a parser

hasPosition
template hasPosition(R)
Undocumented in source.
staticEnumerate
template staticEnumerate(T...)

Utility function for generate a tuple of EnumeratePair from an input tuple. Each EnumeratePair will have an index attached to it

unitizeFunc
template unitizeFunc(func...)

Convert a function that returns void, to function that returns Unit

unitizeType
template unitizeType(T)

Convert void to Unit

Variables

isForwardRange
enum bool isForwardRange(R);
Undocumented in source.
isParsingRange
enum bool isParsingRange(R);

Whether a range is a parsing range. In addition to an input range, a parsing range also has a memeber err representing parsing errors, and a member cont representing its position in the input.

Meta