Mercurial > projects > dil
changeset 303:bc1112f7933d
- Added keyword debug to some statements.
author | aziz |
---|---|
date | Tue, 14 Aug 2007 10:44:04 +0000 |
parents | d04a79e795a2 |
children | fc7b9a3a99d4 |
files | trunk/src/Parser.d trunk/src/main.d |
diffstat | 2 files changed, 5 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/trunk/src/Parser.d Sat Aug 11 20:31:01 2007 +0000 +++ b/trunk/src/Parser.d Tue Aug 14 10:44:04 2007 +0000 @@ -44,8 +44,8 @@ token = lx.token; if (!trying) { -writef("\33[32m%s\33[0m", token.type); - writef("%s", prev[0 .. token.end - prev]); +debug writef("\33[32m%s\33[0m", token.type); +debug writef("%s", prev[0 .. token.end - prev]); prev = token.end; } } while (token.type == T.Comment) // Skip comments @@ -63,7 +63,7 @@ ReturnType try_(ReturnType)(lazy ReturnType parseMethod, out bool success) { -writef("\33[31mtry_\33[0m"); +debug writef("\33[31mtry_\33[0m"); ++trying; // auto len = errors.length; auto oldToken = token; @@ -83,7 +83,7 @@ else success = true; --trying; -writef("\33[34m%s\33[0m", success); +debug writef("\33[34m%s\33[0m", success); return result; }
--- a/trunk/src/main.d Sat Aug 11 20:31:01 2007 +0000 +++ b/trunk/src/main.d Tue Aug 14 10:44:04 2007 +0000 @@ -36,7 +36,7 @@ foreach(decl; decls) { assert(decl !is null); - writefln(indent, decl.classinfo.name, ":", decl.children.length); + writefln(indent, decl.classinfo.name, ": begin=%s end=%s", decl.begin ? decl.begin.srcText : "\33[31mnull\33[0m", decl.end ? decl.end.srcText : "\33[31mnull\33[0m"); print(decl.children, indent ~ " "); } }