PageRenderTime 16ms CodeModel.GetById 10ms RepoModel.GetById 0ms app.codeStats 0ms

/tags/jsdoc_toolkit-2.3.2/jsdoc-toolkit/app/lib/JSDOC/Token.js

http://jsdoc-toolkit.googlecode.com/
JavaScript | 18 lines | 12 code | 3 blank | 3 comment | 3 complexity | 7a2fff7e2cee5f3b45ab76e747b8bbc8 MD5 | raw file
  1. if (typeof JSDOC == "undefined") JSDOC = {};
  2. /**
  3. @constructor
  4. */
  5. JSDOC.Token = function(data, type, name) {
  6. this.data = data;
  7. this.type = type;
  8. this.name = name;
  9. }
  10. JSDOC.Token.prototype.toString = function() {
  11. return "<"+this.type+" name=\""+this.name+"\">"+this.data+"</"+this.type+">";
  12. }
  13. JSDOC.Token.prototype.is = function(what) {
  14. return this.name === what || this.type === what;
  15. }