2 /* Compiler implementation of the D programming language
3 * Copyright (C) 1999-2021 by The D Language Foundation, All Rights Reserved
4 * written by Walter Bright
5 * http://www.digitalmars.com
6 * Distributed under the Boost Software License, Version 1.0.
7 * http://www.boost.org/LICENSE_1_0.txt
8 * https://github.com/dlang/dmd/blob/master/src/dmd/tokens.h
13 #include "root/dcompat.h"
14 #include "root/port.h"
23 < > <= >= == != === !==
24 << >> <<= >>= >>> >>>=
35 enum class TOK
: unsigned short
76 dotTemplateDeclaration
,
92 delegateFunctionPointer
,
111 unsignedRightShiftAssign
,
113 concatenateAssign
, // ~=
114 concatenateElemAssign
,
115 concatenateDcharAssign
,
148 int32Literal
, // 104,
280 moduleString
, // __MODULE__
281 functionString
, // __FUNCTION__
282 prettyFunction
, // __PRETTY_FUNCTION__
302 compoundLiteral
, // ( type-name ) { initializer-list }
324 // C only extended keywords
332 enum class EXP
: unsigned char
362 dotTemplateDeclaration
,
377 delegateFunctionPointer
,
396 unsignedRightShiftAssign
,
398 concatenateAssign
, // ~=
399 concatenateElemAssign
,
400 concatenateDcharAssign
,
463 moduleString
, // __MODULE__
464 functionString
, // __FUNCTION__
465 prettyFunction
, // __PRETTY_FUNCTION__
477 compoundLiteral
, // ( type-name ) { initializer-list }
484 #define TOKwild TOKinout
486 // Token has an anonymous struct, which is not strict ISO C++.
487 #if defined(__GNUC__)
488 #pragma GCC diagnostic push
489 #pragma GCC diagnostic ignored "-Wpedantic"
496 const utf8_t
*ptr
; // pointer to first character of this token within buffer
498 DString blockComment
; // doc comment string prior to this token
499 DString lineComment
; // doc comment for previous token
510 { utf8_t
*ustring
; // UTF8 string
512 unsigned char postfix
; // 'c', 'w', 'd'
520 Token() : next(NULL
) {}
522 const char *toChars() const;
524 static const char *toChars(TOK value
);
527 #if defined(__GNUC__)
528 #pragma GCC diagnostic pop