Mercurial > projects > dil
diff trunk/src/cmd/Generate.d @ 394:6440da4adb07
Fixed forward references of enum MID complaints by compiler.
Fix in cmd.Generate: token whitespace mustn't be printed in printToken().
author | Aziz K?ksal <aziz.koeksal@gmail.com> |
---|---|
date | Wed, 19 Sep 2007 12:20:11 +0200 |
parents | bb935c6f9b7a |
children | 0a4619735ce9 |
line wrap: on
line diff
--- a/trunk/src/cmd/Generate.d Mon Sep 17 21:57:11 2007 +0200 +++ b/trunk/src/cmd/Generate.d Wed Sep 19 12:20:11 2007 +0200 @@ -333,6 +333,10 @@ { token = token.next; + // Print whitespace. + if (token.ws) + print(token.ws[0..token.start - token.ws]); + Node[]* nodes = token in beginNodes; if (nodes) @@ -382,6 +386,9 @@ while (token.type != TOK.EOF) { token = token.next; + // Print whitespace. + if (token.ws) + print(token.ws[0..token.start - token.ws]); printToken(token, tags, print); } print(\n~tags[DocPart.SrcEnd])(\n~tags[DocPart.Tail]); @@ -392,10 +399,6 @@ alias DocPart DP; string srcText = xml_escape(token.srcText); - // Print whitespace. - if (token.ws) - print(token.ws[0..token.start - token.ws]); - switch(token.type) { case TOK.Identifier: