From 9436b184cce4e86bb98d0824a183f8ca247c44b5 Mon Sep 17 00:00:00 2001 From: Hackerpilot Date: Mon, 21 Apr 2014 15:27:42 -0700 Subject: [PATCH] Added another token equality check --- stdx/lexer.d | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/stdx/lexer.d b/stdx/lexer.d index 1df674d..19134a3 100644 --- a/stdx/lexer.d +++ b/stdx/lexer.d @@ -249,6 +249,11 @@ struct TokenStructure(IdType, string extraFields = "") { public: + bool opEquals(ref const typeof(this) other) const pure nothrow @safe + { + return this.type == other.type && this.text == other.text; + } + /** * Returs: true if the token has the given type, false otherwise. */