1 /**
  2  * @fileoverview Class represents a generic token called
  3  * start-empty-tag.
  4  */
  5 
  6 goog.provide('xrx.token.StartEmptyTag');
  7 
  8 
  9 
 10 goog.require('xrx.token');
 11 
 12 
 13 
 14 /**
 15  * Constructs a new start-empty-tag token. xrx.token.StartEmptyTag
 16  * is a generic token which stands for either the start-tag or the
 17  * empty-tag token. This is especially useful to evaluate Path
 18  * expressions which do not distinguish between start and empty tags.
 19  * 
 20  * @constructor
 21  * @extends xrx.token
 22  */
 23 xrx.token.StartEmptyTag = function(label, opt_offset, opt_length) {
 24   goog.base(this, xrx.token.START_EMPTY_TAG, label, opt_offset, opt_length);
 25 };
 26 goog.inherits(xrx.token.StartEmptyTag, xrx.token);
 27 
 28 
 29 
 30 /**
 31  * Compares the generic type of two tokens.
 32  *
 33  * @param {!number} type The type to check against.
 34  * @return {!boolean}
 35  */
 36 xrx.token.StartEmptyTag.prototype.typeOf = function(type) {
 37   return this.type_ === type || xrx.token.START_TAG === type || 
 38       xrx.token.EMPTY_TAG === type || xrx.token.TAG === type;
 39 };