Mercurial > projects > dang
diff lexer/Keyword.d @ 126:c3b24e7e8cf8
Carius changes to the parser. Parsing attributes, lexing many keywords(not all yet).
author | Anders Johnsen <skabet@gmail.com> |
---|---|
date | Tue, 27 May 2008 10:32:31 +0200 |
parents | 09b4d74cb3f5 |
children | 2be29b296081 |
line wrap: on
line diff
--- a/lexer/Keyword.d Sun May 25 21:13:56 2008 +0200 +++ b/lexer/Keyword.d Tue May 27 10:32:31 2008 +0200 @@ -35,6 +35,16 @@ // type related "struct" : Tok.Struct, + "function" : Tok.Function, + "delegate" : Tok.Delegate, + "class" : Tok.Class, + "interface" : Tok.Interface, + "union" : Tok.Union, + "typedef" : Tok.Typedef, + "typeid" : Tok.Typeid, + "typeof" : Tok.Typeof, + "sizeof" : Tok.Sizeof, + "alias" : Tok.Alias, // control flow "if" : Tok.If, @@ -43,11 +53,40 @@ "switch" : Tok.Switch, "case" : Tok.Case, "default" : Tok.Default, + "break" : Tok.Break, "return" : Tok.Return, "cast" : Tok.Cast, // modules "module" : Tok.Module, - "import" : Tok.Import + "import" : Tok.Import, + + // attributse + "public" : Tok.Public, + "private" : Tok.Public, + "protected" : Tok.Protected, + "package" : Tok.Package, + "export" : Tok.Export, + "static" : Tok.Static, + "final" : Tok.Final, + "const" : Tok.Const, + "abstract" : Tok.Abstract, + "override" : Tok.Override, + "depracted" : Tok.Depracted, + "auto" : Tok.Auto, + + // exceptions + "assert" : Tok.Assert, + "throw" : Tok.Throw, + "try" : Tok.Try, + "catch" : Tok.Catch, + "finally" : Tok.Finally, + + // functions + "in" : Tok.In, + "out" : Tok.Out, + "body" : Tok.Body, + + "asm" : Tok.Asm ]; }