diff --git a/src/project/Symbol.js b/src/project/Symbol.js index e4c806ff..a75f407a 100644 --- a/src/project/Symbol.js +++ b/src/project/Symbol.js @@ -147,5 +147,17 @@ var Symbol = Base.extend(/** @lends Symbol# */{ */ clone: function() { return new Symbol(this._definition.clone(false)); + }, + + /** + * Checks whether the symbol's definition is equal to the supplied symbol. + * + * @param {Symbol} symbol + * @return {Boolean} {@true if they are equal} + */ + equals: function(symbol) { + return symbol === this + || symbol && this.definition.equals(symbol.definition) + || false; } });