Anything that can successfully be converted to a string with String() so that it can be used in error messages.

The GrammarLocation class in Peggy is a good example.

interface GrammarSourceObject {
    offset?: ((loc: BloksExecutableAst.Location) => BloksExecutableAst.Location);
    toString: (() => string);
}

Properties

Properties

If specified, allows the grammar source to be embedded in a larger file at some offset.

toString: (() => string)