comparison trunk/src/Token.d @ 323:6259fb93e3dd

- Rewrote scanSpecialToken(). - Added Filespec to enum TOK. - Added another nested struct to union in Token. - Deleted ExpectedNormalStringLiteral from enum MID and added ExpectedFilespec and UnterminatedFilespec. Adapted lang_de.d and lang_en.d accordingly. - Fixed some code in scanNumber(). Added some assert statements.
author aziz
date Tue, 21 Aug 2007 15:26:00 +0000
parents ebd21bbf296e
children
comparison
equal deleted inserted replaced
322:ed4ef0173793 323:6259fb93e3dd
19 /// Flag for whitespace tokens that must be ignored in the parsing phase. 19 /// Flag for whitespace tokens that must be ignored in the parsing phase.
20 Whitespace = 0x8000, 20 Whitespace = 0x8000,
21 Comment = 1 | Whitespace, 21 Comment = 1 | Whitespace,
22 Shebang = 2 | Whitespace, 22 Shebang = 2 | Whitespace,
23 HashLine = 3 | Whitespace, 23 HashLine = 3 | Whitespace,
24 24 Filespec = 4 | Whitespace,
25 Identifier = 4, 25
26 Identifier = 5,
26 String, 27 String,
27 Special, 28 Special,
28 CharLiteral, WCharLiteral, DCharLiteral, 29 CharLiteral, WCharLiteral, DCharLiteral,
29 30
30 // Numbers 31 // Numbers
116 117
117 union 118 union
118 { 119 {
119 struct 120 struct
120 { 121 {
122 Token* line_num; // #line number
123 Token* line_filespec; // #line number filespec
124 }
125 struct
126 {
121 string str; 127 string str;
122 char pf; 128 char pf;
123 } 129 }
124 dchar dchar_; 130 dchar dchar_;
125 long long_; 131 long long_;