From bdc5c7aa52ce7ddeb6327812730db7351ac43857 Mon Sep 17 00:00:00 2001 From: Callum Anderson Date: Sat, 22 Feb 2014 17:31:28 +1100 Subject: [PATCH 1/3] Struct member initializers were not being stored --- stdx/d/parser.d | 2 ++ 1 file changed, 2 insertions(+) diff --git a/stdx/d/parser.d b/stdx/d/parser.d index 573cfb5..0b274ba 100644 --- a/stdx/d/parser.d +++ b/stdx/d/parser.d @@ -4723,6 +4723,8 @@ q{(int a, ...) do { auto structMemberInitializer = parseStructMemberInitializer(); + if (structMemberInitializer !is null) + node.structMemberInitializers ~= structMemberInitializer; if (currentIs(tok!",")) { advance(); From 083c3f5d412b681869ddc8c922906b858f7008b9 Mon Sep 17 00:00:00 2001 From: Callum Anderson Date: Mon, 24 Feb 2014 11:17:26 +1100 Subject: [PATCH 2/3] Distinguish between conditional dec and stmnt --- stdx/d/parser.d | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/stdx/d/parser.d b/stdx/d/parser.d index 0b274ba..a27fa52 100644 --- a/stdx/d/parser.d +++ b/stdx/d/parser.d @@ -6105,7 +6105,15 @@ protected: return !peekIs(tok!"switch"); case tok!"debug": case tok!"version": - return !peekIs(tok!"="); + { + if (peekIs(tok!"=")) + return false; + + auto b = setBookmark(); + scope (exit) goToBookmark(b); + advance(); + return isDeclaration(); + } case tok!"synchronized": if (peekIs(tok!"(")) return false; From 7d4eec1961b94d47cfa555da53c576f769ffcec4 Mon Sep 17 00:00:00 2001 From: Hackerpilot Date: Tue, 25 Feb 2014 13:06:02 -0800 Subject: [PATCH 3/3] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 0e0435c..3e5eb93 100644 --- a/README.md +++ b/README.md @@ -51,6 +51,7 @@ given source files. * "fish operators" (floating point operators) are deprecated. * Left side of a *foreach* or *foreach\_reverse* range expression is larger than the right. * Left side of a slice expression is larger than the right +* Variable, struct, class, union, module, package, and interface names that do not comply with Phobos style guidelines #### Wishlish * Assigning to foreach variables that are not "ref".