dmd.tokens
Defines lexical tokens.
Specification: Tokens
License
Source: tokens.d
Documentation: https://dlang.org/phobos/dmd_tokens.html
-
Declaration
enumEXP: ubyte;Expression nodes
-
Declaration
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.
-
Declaration
structToken;-
Declaration
nothrow voidsetString(const(char)*ptr, size_tlength);Set to contents of
ptr[0..length]Parameters
const(char)*ptrpointer to string
size_tlengthlengthof string -
Declaration
nothrow voidsetString(const ref OutBufferbuf);Set to contents of
bufParameters
OutBufferbufstring (not zero terminated)
-
Declaration
nothrow voidsetString();Set to empty string
-
-
Declaration
nothrow voidwriteCharLiteral(ref OutBufferbuf, dcharc);Write a character, using a readable escape sequence if needed
Discussion
Useful for printing "" string literals in e.g. error messages, ddoc, or the
.stringofpropertyParameters
OutBufferbufbuffer to append character in
dcharccode point to write
-
Declaration
nothrow voidwriteSingleCharLiteral(ref OutBufferbuf, dcharc);Write a single-quoted character literal
Discussion
Useful for printing '' char literals in e.g. error messages, ddoc, or the
.stringofpropertyParameters
OutBufferbufbuffer to append character in
dcharccode point to write