Report a bug
If you spot a problem with this page, click here to create a GitHub issue.
Improve this page
Quickly fork, edit online, and submit a pull request for this page.
Requires a signed-in GitHub account. This works well for small changes.
If you'd like to make larger changes you may want to consider using
a local clone.
dmd.tokens
Defines lexical tokens.
Specification Tokens
Authors:
License:
Source tokens.d
Documentation https://dlang.org/phobos/dmd_tokens.html
- enum
EXP: ubyte; - Expression nodes
- static immutable TOK[TOK.max + 1]
Ckeywords; - This is used to pick the C keywords out of the tokens. If it's not a C keyword, then it's an identifier.
- struct
Token; -
- nothrow void
setString(const(char)[]str); - Set to contents of strParameters:
const(char)[] strstring - nothrow void
toString(scope void delegate(ubyte c) nothrowsink) const; - Parameters:
void delegate(ubyte c) nothrow sinkwhere the generated characters get sent
- nothrow void
writeCharLiteral(dchard, scope void delegate(ubyte) nothrowsink); - Write a character, using a readable escape sequence if neededUseful for printing "" string literals in e.g. error messages, ddoc, or the .stringof propertyParameters:
dchar ddchar to convert to literal void delegate(ubyte) nothrow sinksink for generated characters - nothrow void
writeSingleCharLiteral(dcharc, scope void delegate(ubytec) nothrowsink); - Write a single-quoted character literalUseful for printing '' char literals in e.g. error messages, ddoc, or the .stringof propertyParameters:
dchar ccode point to write void delegate(ubyte c) nothrowsinkwhere the output goes
Copyright © 1999-2026 by the D Language Foundation | Page generated by
Ddoc on Wed Aug 19 13:53:32 2026