Mercurial > projects > dang
diff lexer/Token.d @ 48:b6c1dc30ca4b new_gen
Only tests that dont pass now are structs and switches
As far as the parser is concerned assignments are binary expressions
Fixed a bug in codegen of if's - it is important to remember that the
builder might be positioned at a new block after generating sub-statements
author | Anders Halager <halager@gmail.com> |
---|---|
date | Thu, 24 Apr 2008 19:42:53 +0200 |
parents | 495188f9078e |
children | 78a6808b2e0f |
line wrap: on
line diff
--- a/lexer/Token.d Wed Apr 23 17:09:44 2008 +0200 +++ b/lexer/Token.d Thu Apr 24 19:42:53 2008 +0200 @@ -67,6 +67,14 @@ } /** + Returns true for all the various assignments (=, +=, *= ...) + */ + bool isAssignment() + { + return type == Tok.Assign; + } + + /** Just a shortcut to avoid `token.type == Tok.Identifier`. */ bool isIdentifier()