PageRenderTime 22ms CodeModel.GetById 20ms app.highlight 1ms RepoModel.GetById 1ms 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
 1if (typeof JSDOC == "undefined") JSDOC = {};
 2
 3/**
 4	@constructor
 5*/
 6JSDOC.Token = function(data, type, name) {
 7	this.data = data;
 8	this.type = type;
 9	this.name = name;
10}
11
12JSDOC.Token.prototype.toString = function() { 
13	return "<"+this.type+" name=\""+this.name+"\">"+this.data+"</"+this.type+">";
14}
15
16JSDOC.Token.prototype.is = function(what) {
17	return this.name === what || this.type === what;
18}