Mercurial > projects > ldc
comparison dmd/identifier.h @ 1:c53b6e3fe49a trunk
[svn r5] Initial commit. Most things are very rough.
author | lindquist |
---|---|
date | Sat, 01 Sep 2007 21:43:27 +0200 |
parents | |
children | 6aee82889553 |
comparison
equal
deleted
inserted
replaced
0:a9e71648e74d | 1:c53b6e3fe49a |
---|---|
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 char *toHChars2(); | |
41 int dyncast(); | |
42 | |
43 static Identifier *generateId(char *prefix); | |
44 }; | |
45 | |
46 #endif /* DMD_IDENTIFIER_H */ |