comparison src/lexer/Keyword.d @ 206:d3c148ca429b

Major moving of files. all src now goes into src, all docs in docs.
author Anders Johnsen <skabet@gmail.com>
date Tue, 12 Aug 2008 18:14:56 +0200
parents
children e0551773a005
comparison
equal deleted inserted replaced
205:8387cbaa85ab 206:d3c148ca429b
1 module lexer.Keyword;
2
3 import lexer.Token;
4
5 /**
6 A list of keywords in an associative array that link a string
7 representation of the keyword to a Tok
8 */
9 Tok[char[]] keywords;
10
11 static this ()
12 {
13 keywords =
14 [
15 // types
16 "byte"[] : Tok.Byte,
17 "ubyte" : Tok.Ubyte,
18 "short" : Tok.Short,
19 "ushort" : Tok.Ushort,
20 "int" : Tok.Int,
21 "uint" : Tok.Uint,
22 "long" : Tok.Long,
23 "ulong" : Tok.Ulong,
24
25 "char" : Tok.Char,
26 "wchar" : Tok.Wchar,
27 "dchar" : Tok.Dchar,
28
29 "bool" : Tok.Bool,
30
31 "float" : Tok.Float,
32 "double" : Tok.Double,
33
34 "void" : Tok.Void,
35
36 // type related
37 "struct" : Tok.Struct,
38
39 // control flow
40 "if" : Tok.If,
41 "else" : Tok.Else,
42 "while" : Tok.While,
43 "switch" : Tok.Switch,
44 "case" : Tok.Case,
45 "default" : Tok.Default,
46 "return" : Tok.Return,
47 "cast" : Tok.Cast,
48
49 // modules
50 "module" : Tok.Module,
51 "import" : Tok.Import
52 ];
53 }