comparison dmd/lexer.h @ 159:5acec6b2eef8 trunk

[svn r175] merged dmd 1.029
author ChristianK
date Thu, 01 May 2008 15:15:28 +0200
parents 788401029ecf
children aaade6ded589
comparison
equal deleted inserted replaced
158:287540c5f05e 159:5acec6b2eef8
1 1
2 // Compiler implementation of the D programming language 2 // Compiler implementation of the D programming language
3 // Copyright (c) 1999-2007 by Digital Mars 3 // Copyright (c) 1999-2008 by Digital Mars
4 // All Rights Reserved 4 // All Rights Reserved
5 // written by Walter Bright 5 // written by Walter Bright
6 // http://www.digitalmars.com 6 // http://www.digitalmars.com
7 // License for redistribution is by either the Artistic License 7 // License for redistribution is by either the Artistic License
8 // in artistic.txt, or the GNU General Public License in gnu.txt. 8 // in artistic.txt, or the GNU General Public License in gnu.txt.
90 TOKmul, TOKdiv, TOKmod, 90 TOKmul, TOKdiv, TOKmod,
91 TOKmulass, TOKdivass, TOKmodass, 91 TOKmulass, TOKdivass, TOKmodass,
92 TOKand, TOKor, TOKxor, 92 TOKand, TOKor, TOKxor,
93 TOKandass, TOKorass, TOKxorass, 93 TOKandass, TOKorass, TOKxorass,
94 TOKassign, TOKnot, TOKtilde, 94 TOKassign, TOKnot, TOKtilde,
95 TOKplusplus, TOKminusminus, TOKconstruct, 95 TOKplusplus, TOKminusminus, TOKconstruct, TOKblit,
96 TOKdot, TOKarrow, TOKcomma, 96 TOKdot, TOKarrow, TOKcomma,
97 TOKquestion, TOKandand, TOKoror, 97 TOKquestion, TOKandand, TOKoror,
98 98
99 // 103 99 // 104
100 // Numeric literals 100 // Numeric literals
101 TOKint32v, TOKuns32v, 101 TOKint32v, TOKuns32v,
102 TOKint64v, TOKuns64v, 102 TOKint64v, TOKuns64v,
103 TOKfloat32v, TOKfloat64v, TOKfloat80v, 103 TOKfloat32v, TOKfloat64v, TOKfloat80v,
104 TOKimaginary32v, TOKimaginary64v, TOKimaginary80v, 104 TOKimaginary32v, TOKimaginary64v, TOKimaginary80v,
129 TOKmixin, 129 TOKmixin,
130 130
131 TOKalign, TOKextern, TOKprivate, TOKprotected, TOKpublic, TOKexport, 131 TOKalign, TOKextern, TOKprivate, TOKprotected, TOKpublic, TOKexport,
132 TOKstatic, /*TOKvirtual,*/ TOKfinal, TOKconst, TOKabstract, TOKvolatile, 132 TOKstatic, /*TOKvirtual,*/ TOKfinal, TOKconst, TOKabstract, TOKvolatile,
133 TOKdebug, TOKdeprecated, TOKin, TOKout, TOKinout, TOKlazy, 133 TOKdebug, TOKdeprecated, TOKin, TOKout, TOKinout, TOKlazy,
134 TOKauto, TOKpackage, 134 TOKauto, TOKpackage, TOKmanifest,
135 135
136 // Statements 136 // Statements
137 TOKif, TOKelse, TOKwhile, TOKfor, TOKdo, TOKswitch, 137 TOKif, TOKelse, TOKwhile, TOKfor, TOKdo, TOKswitch,
138 TOKcase, TOKdefault, TOKbreak, TOKcontinue, TOKwith, 138 TOKcase, TOKdefault, TOKbreak, TOKcontinue, TOKwith,
139 TOKsynchronized, TOKreturn, TOKgoto, TOKtry, TOKcatch, TOKfinally, 139 TOKsynchronized, TOKreturn, TOKgoto, TOKtry, TOKcatch, TOKfinally,
150 // Added after 1.0 150 // Added after 1.0
151 TOKref, 151 TOKref,
152 TOKmacro, 152 TOKmacro,
153 #if V2 153 #if V2
154 TOKtraits, 154 TOKtraits,
155 TOKoverloadset,
156 TOKpure,
155 #endif 157 #endif
156 158
157 TOKMAX 159 TOKMAX
158 }; 160 };
159 161
259 unsigned char *base, unsigned begoffset, unsigned endoffset, 261 unsigned char *base, unsigned begoffset, unsigned endoffset,
260 int doDocComment, int commentToken); 262 int doDocComment, int commentToken);
261 263
262 static void initKeywords(); 264 static void initKeywords();
263 static Identifier *idPool(const char *s); 265 static Identifier *idPool(const char *s);
266 static Identifier *uniqueId(const char *s);
267 static Identifier *uniqueId(const char *s, int num);
264 268
265 TOK nextToken(); 269 TOK nextToken();
266 void scan(Token *t); 270 void scan(Token *t);
267 Token *peek(Token *t); 271 Token *peek(Token *t);
268 Token *peekPastParen(Token *t); 272 Token *peekPastParen(Token *t);