Mercurial > projects > dil
diff trunk/src/dil/doc/Doc.d @ 679:ff6971637f88
Renamed Token member type to kind.
author | Aziz K?ksal <aziz.koeksal@gmail.com> |
---|---|
date | Fri, 18 Jan 2008 23:40:12 +0100 |
parents | c4e3a34e40f1 |
children | 6b3e397229c5 |
line wrap: on
line diff
--- a/trunk/src/dil/doc/Doc.d Fri Jan 18 23:11:44 2008 +0100 +++ b/trunk/src/dil/doc/Doc.d Fri Jan 18 23:40:12 2008 +0100 @@ -8,12 +8,12 @@ bool isDoxygenComment(Token* token) { // Doxygen: '/+!' '/*!' '//!' - return token.type == TOK.Comment && token.start[2] == '!'; + return token.kind == TOK.Comment && token.start[2] == '!'; } bool isDDocComment(Token* token) { // DDOC: '/++' '/**' '///' - return token.type == TOK.Comment && token.start[1] == token.start[2]; + return token.kind == TOK.Comment && token.start[1] == token.start[2]; } /++ @@ -30,19 +30,19 @@ while (1) { token = token.prev; - if (token.type == TOK.LBrace || - token.type == TOK.RBrace || - token.type == TOK.Semicolon || - token.type == TOK.HEAD || - (node.kind == NodeKind.EnumMember && token.type == TOK.Comma)) + if (token.kind == TOK.LBrace || + token.kind == TOK.RBrace || + token.kind == TOK.Semicolon || + token.kind == TOK.HEAD || + (node.kind == NodeKind.EnumMember && token.kind == TOK.Comma)) break; - if (token.type == TOK.Comment) + if (token.kind == TOK.Comment) { // Check that this comment doesn't belong to the previous declaration. - if (node.kind == NodeKind.EnumMember && token.type == TOK.Comma) + if (node.kind == NodeKind.EnumMember && token.kind == TOK.Comma) break; - switch (token.prev.type) + switch (token.prev.kind) { case TOK.Semicolon, TOK.RBrace: break; @@ -54,15 +54,15 @@ } // Get single comment to the right. token = node.end.next; - if (token.type == TOK.Comment && isDocComment(token)) + if (token.kind == TOK.Comment && isDocComment(token)) comments ~= token; else if (node.kind == NodeKind.EnumMember) { token = node.end.nextNWS; - if (token.type == TOK.Comma) + if (token.kind == TOK.Comma) { token = token.next; - if (token.type == TOK.Comment && isDocComment(token)) + if (token.kind == TOK.Comment && isDocComment(token)) comments ~= token; } }