Mercurial > projects > dil
changeset 24:903f91163f23
- Added code for parsing AndAssign, AndLogical and AndBinary tokens.
author | aziz |
---|---|
date | Sun, 24 Jun 2007 11:15:03 +0000 |
parents | 1a7903701a3d |
children | 9c866208b3f6 |
files | trunk/src/Lexer.d trunk/src/Token.d |
diffstat | 2 files changed, 10 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/trunk/src/Lexer.d Sun Jun 24 11:13:01 2007 +0000 +++ b/trunk/src/Lexer.d Sun Jun 24 11:15:03 2007 +0000 @@ -284,6 +284,15 @@ else t.type = TOK.OrBinary; goto Lcommon; + case '&': + c = *++p; + if (c == '=') + t.type = TOK.AndAssign; + else if (c == '&') + t.type = TOK.AndLogical; + else + t.type = TOK.AndBinary; + goto Lcommon; case '(': t.type = TOK.LParen; goto Lcommon;