mirror of
https://github.com/atom/atom.git
synced 2026-01-22 13:28:01 -05:00
Fix Token::isEqual() to accept scopes for now.
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user