diff --git a/std/d/ast.d b/std/d/ast.d index 565ff00..0121da8 100644 --- a/std/d/ast.d +++ b/std/d/ast.d @@ -787,6 +787,7 @@ public: } /** */ Token[] identifiers; /** */ Initializer[] initializers; + /** */ string comment; mixin OpEquals; } diff --git a/std/d/parser.d b/std/d/parser.d index c23811f..34bccad 100644 --- a/std/d/parser.d +++ b/std/d/parser.d @@ -6051,6 +6051,7 @@ q{doStuff(5)}c; } node.type = type is null ? parseType() : type; + node.comment = comment; Declarator[] declarators; while(true) @@ -6073,7 +6074,7 @@ q{doStuff(5)}c; // } // else { - expect(tok!";"); + if (expect(tok!";") is null) return null; return node; } }