Mercurial > projects > dil
comparison trunk/src/dil/doc/Doc.d @ 680:6b3e397229c5
Renamed Statements, Declarations and EnumMember.
Statements -> CompoundStatement.
Declarations -> CompoundDeclaration.
EnumMember -> EnumMemberDeclaration.
author | Aziz K?ksal <aziz.koeksal@gmail.com> |
---|---|
date | Fri, 18 Jan 2008 23:59:41 +0100 |
parents | ff6971637f88 |
children | f8875ef9a66d |
comparison
equal
deleted
inserted
replaced
679:ff6971637f88 | 680:6b3e397229c5 |
---|---|
32 token = token.prev; | 32 token = token.prev; |
33 if (token.kind == TOK.LBrace || | 33 if (token.kind == TOK.LBrace || |
34 token.kind == TOK.RBrace || | 34 token.kind == TOK.RBrace || |
35 token.kind == TOK.Semicolon || | 35 token.kind == TOK.Semicolon || |
36 token.kind == TOK.HEAD || | 36 token.kind == TOK.HEAD || |
37 (node.kind == NodeKind.EnumMember && token.kind == TOK.Comma)) | 37 (node.kind == NodeKind.EnumMemberDeclaration && token.kind == TOK.Comma)) |
38 break; | 38 break; |
39 | 39 |
40 if (token.kind == TOK.Comment) | 40 if (token.kind == TOK.Comment) |
41 { | 41 { |
42 // Check that this comment doesn't belong to the previous declaration. | 42 // Check that this comment doesn't belong to the previous declaration. |
43 if (node.kind == NodeKind.EnumMember && token.kind == TOK.Comma) | 43 if (node.kind == NodeKind.EnumMemberDeclaration && token.kind == TOK.Comma) |
44 break; | 44 break; |
45 switch (token.prev.kind) | 45 switch (token.prev.kind) |
46 { | 46 { |
47 case TOK.Semicolon, TOK.RBrace: | 47 case TOK.Semicolon, TOK.RBrace: |
48 break; | 48 break; |
54 } | 54 } |
55 // Get single comment to the right. | 55 // Get single comment to the right. |
56 token = node.end.next; | 56 token = node.end.next; |
57 if (token.kind == TOK.Comment && isDocComment(token)) | 57 if (token.kind == TOK.Comment && isDocComment(token)) |
58 comments ~= token; | 58 comments ~= token; |
59 else if (node.kind == NodeKind.EnumMember) | 59 else if (node.kind == NodeKind.EnumMemberDeclaration) |
60 { | 60 { |
61 token = node.end.nextNWS; | 61 token = node.end.nextNWS; |
62 if (token.kind == TOK.Comma) | 62 if (token.kind == TOK.Comma) |
63 { | 63 { |
64 token = token.next; | 64 token = token.next; |