diff --git a/stdx/d/ast.d b/stdx/d/ast.d index dd9f3e3..dc21ae3 100644 --- a/stdx/d/ast.d +++ b/stdx/d/ast.d @@ -2176,6 +2176,7 @@ public: } /** */ FunctionBody functionBody; /** */ size_t location; + /** */ string comment; } /// @@ -2188,6 +2189,7 @@ public: } /** */ FunctionBody functionBody; /** */ size_t location; + /** */ string comment; } /// diff --git a/stdx/d/lexer.d b/stdx/d/lexer.d index c042007..904298c 100644 --- a/stdx/d/lexer.d +++ b/stdx/d/lexer.d @@ -57,6 +57,12 @@ public template tok(string token) } enum extraFields = q{ string comment; + + int opCmp(size_t i) const pure nothrow @safe { + if (index < i) return -1; + if (index > i) return 1; + return 0; + } }; public alias stdx.lexer.TokenStructure!(IdType, extraFields) Token;