can generate jsdoc; private methods marked as such
[dygraphs.git] / jsdoc-toolkit / app / lib / JSDOC / Token.js
diff --git a/jsdoc-toolkit/app/lib/JSDOC/Token.js b/jsdoc-toolkit/app/lib/JSDOC/Token.js
new file mode 100644 (file)
index 0000000..fb7f9d9
--- /dev/null
@@ -0,0 +1,18 @@
+if (typeof JSDOC == "undefined") JSDOC = {};
+
+/**
+       @constructor
+*/
+JSDOC.Token = function(data, type, name) {
+       this.data = data;
+       this.type = type;
+       this.name = name;
+}
+
+JSDOC.Token.prototype.toString = function() { 
+       return "<"+this.type+" name=\""+this.name+"\">"+this.data+"</"+this.type+">";
+}
+
+JSDOC.Token.prototype.is = function(what) {
+       return this.name === what || this.type === what;
+}
\ No newline at end of file