From c08602e0b7f1423e7430284f74183e81a7845e59 Mon Sep 17 00:00:00 2001
From: Hackerpilot <briancschott@gmail.com>
Date: Tue, 14 Jan 2014 01:01:06 +0000
Subject: [PATCH] Added fields needed by DCD

---
 stdx/d/ast.d   | 2 ++
 stdx/d/lexer.d | 6 ++++++
 2 files changed, 8 insertions(+)

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;