From 22e43600d27d199ce7df12d253a8331e036c20e7 Mon Sep 17 00:00:00 2001 From: Ben Ogle Date: Mon, 13 Oct 2014 16:51:10 -0700 Subject: [PATCH] Fix Token::isEqual() to accept scopes for now. --- src/token.coffee | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/token.coffee b/src/token.coffee index ae1bc11b2..fdeb09c82 100644 --- a/src/token.coffee +++ b/src/token.coffee @@ -26,7 +26,9 @@ class Token @hasPairedCharacter = textUtils.hasPairedCharacter(@value) isEqual: (other) -> - @value == other.value and _.isEqual(@scopeDescriptor, other.scopeDescriptor) and !!@isAtomic == !!other.isAtomic + # TODO: scopes is deprecated. This is here for the sake of lang package tests + scopeDescriptor = other.scopeDescriptor ? other.scopes + @value == other.value and _.isEqual(@scopeDescriptor, scopeDescriptor) and !!@isAtomic == !!other.isAtomic isBracket: -> /^meta\.brace\b/.test(_.last(@scopeDescriptor))