comparison dmd2/identifier.h @ 758:f04dde6e882c

Added initial D2 support, D2 frontend and changes to codegen to make things compile.
author Tomas Lindquist Olsen <tomas.l.olsen@gmail.com>
date Tue, 11 Nov 2008 01:38:48 +0100
parents
children 638d16625da2
comparison
equal deleted inserted replaced
757:2c730d530c98 758:f04dde6e882c
1
2 // Compiler implementation of the D programming language
3 // Copyright (c) 1999-2006 by Digital Mars
4 // All Rights Reserved
5 // written by Walter Bright
6 // http://www.digitalmars.com
7 // License for redistribution is by either the Artistic License
8 // in artistic.txt, or the GNU General Public License in gnu.txt.
9 // See the included readme.txt for details.
10
11 #ifndef DMD_IDENTIFIER_H
12 #define DMD_IDENTIFIER_H
13
14 #ifdef __DMC__
15 #pragma once
16 #endif /* __DMC__ */
17
18 #include "root.h"
19
20 namespace llvm
21 {
22 class Value;
23 }
24
25 struct Identifier : Object
26 {
27 int value;
28 const char *string;
29 unsigned len;
30
31 Identifier(const char *string, int value);
32 int equals(Object *o);
33 hash_t hashCode();
34 int compare(Object *o);
35 void print();
36 char *toChars();
37 #ifdef _DH
38 char *toHChars();
39 #endif
40 const char *toHChars2();
41 int dyncast();
42
43 static Identifier *generateId(const char *prefix);
44 static Identifier *generateId(const char *prefix, size_t i);
45 };
46
47 #endif /* DMD_IDENTIFIER_H */