W3cubDocs

/D

dmd.denum

Handle enums.

Compiler implementation of the D programming language.

Authors:
Walter Bright
License:
Boost License 1.0
Source
denum.d
Documentation
https://dlang.org/phobos/dmd_denum.html
Coverage
https://codecov.io/gh/dlang/dmd/src/master/src/dmd/denum.d
References
https://dlang.org/spec/enum.html
class EnumDeclaration: dmd.dsymbol.ScopeDsymbol;

AST node for EnumDeclaration https://dlang.org/spec/enum.html#EnumDeclaration

Expression getMaxMinValue(ref const Loc loc, Identifier id);

Get the value of the .max/.min property as an Expression. Lazily computes the value and caches it in maxval/minval. Reports any errors.

Parameters:
Loc loc location to use for error messages
Identifier id Id::max or Id::min
Returns:
corresponding value of .max/.min
const nothrow @nogc bool isSpecial();

Determine if enum is a special one.

Returns:
true if special
class EnumMember: dmd.declaration.VarDeclaration;

AST node representing a member of an enum. https://dlang.org/spec/enum.html#EnumMember https://dlang.org/spec/enum.html#AnonymousEnumMember

nothrow @nogc bool isSpecialEnumIdent(const Identifier ident);

Check for special enum names.

Special enum names are used by the C++ name mangler to represent C++ types that are not basic D types.

Parameters:
Identifier ident identifier to check for specialness
Returns:
true if it is special

© 1999–2019 The D Language Foundation
Licensed under the Boost License 1.0.
https://dlang.org/phobos/dmd_denum.html