2 * Provide the root object that AST classes in dmd inherit from.
4 * Copyright: Copyright (C) 1999-2024 by The D Language Foundation, All Rights Reserved
5 * Authors: Walter Bright, https://www.digitalmars.com
6 * License: $(LINK2 https://www.boost.org/LICENSE_1_0.txt, Boost License 1.0)
7 * Source: $(LINK2 https://github.com/dlang/dmd/blob/master/src/dmd/rootobject.d, _rootobject.d)
8 * Documentation: https://dlang.org/phobos/dmd_rootobject.html
9 * Coverage: https://codecov.io/gh/dlang/dmd/src/master/src/dmd/rootobject.d
12 module dmd
.rootobject
;
14 /***********************************************************
32 /***********************************************************
35 extern (C
++) class RootObject
37 this() nothrow pure @nogc @safe scope
41 bool equals(const RootObject o
) const
46 const(char)* toChars() const
52 extern(D
) const(char)[] toString() const
54 import core
.stdc
.string
: strlen
;
55 auto p
= this.toChars();
56 return p
[0 .. strlen(p
)];
59 DYNCAST
dyncast() const nothrow pure @nogc @safe
61 return DYNCAST
.object
;