dietc.lexer

Undocumented in source.

Members

Aliases

Position
alias Position = size_t[2]

zero-based [line, column]

Enums

IndentStyle
enum IndentStyle
Undocumented in source.
TokenType
enum TokenType
Undocumented in source.

Functions

bytesToPosition
Position bytesToPosition(string code, size_t bytes)
Undocumented in source. Be warned that the author may not have intended to support it.
indent
string indent(string s, string indentation)
Undocumented in source. Be warned that the author may not have intended to support it.
isWhiteButNotNewline
bool isWhiteButNotNewline(dchar c)
Undocumented in source. Be warned that the author may not have intended to support it.
matchText
bool matchText(DietInput input, string match)

Advances the input and returns true in case the tokens start with this match. Warning: on match this will start a next token if it contains part of the match, discarding it basically.

validateIdentifier
bool validateIdentifier(string s)

[-_0-9a-zA-Z]+

validateIdentifierAlpha
bool validateIdentifierAlpha(string s)

[-_a-zA-Z] [-_0-9a-zA-Z]*

validateTagIdentifier
bool validateTagIdentifier(string s)

[-:_0-9a-zA-Z]+

Structs

DietInput
struct DietInput
Undocumented in source.
ErrorContext
struct ErrorContext
Undocumented in source.
Token
struct Token
Undocumented in source.

Meta