Mercurial > projects > dang
diff lexer/Token.d @ 146:8c09fdaa724e
Parsing for-loop.
author | Anders Johnsen <skabet@gmail.com> |
---|---|
date | Mon, 21 Jul 2008 18:16:50 +0200 |
parents | 927ae00bd9d2 |
children | 6ec686d9c87d |
line wrap: on
line diff
--- a/lexer/Token.d Mon Jul 21 17:56:33 2008 +0200 +++ b/lexer/Token.d Mon Jul 21 18:16:50 2008 +0200 @@ -100,6 +100,14 @@ } /** + just a shortcut to avoid `token.type == tok.For`. + */ + bool isFor() + { + return type == Tok.For; + } + + /** just a shortcut to avoid `token.type == tok.If`. */ bool isIf() @@ -193,6 +201,7 @@ If, Else, While, + For, Switch, Case, Default, Break, Return, Cast, @@ -274,6 +283,7 @@ Tok.Integer:"Integer", Tok.If:"If", Tok.While:"While", + Tok.For:"For", Tok.Switch:"Switch", Tok.Case:"Case", Tok.Default:"Default",