sync fixes
[app.jsdoc] / JSDOC / Token.js
index fe7de05..39313c1 100644 (file)
@@ -4,11 +4,12 @@ XObject = imports.XObject.XObject;
  
 console = imports.console.console;
 /**
- *     @class Token
- *  @scope JSDOC
 
- *  @prop data {String} raw value of token
- *  @prop type {String} type of token
+ *  
+ *  Token of a JS file eg. a keyword, identifier, punctionaion etc..
+ *  
+ * <PRE>
+ *  Token Types:
  *     TOKN  (unknown)          - name is UNKNOWN_TOKEN
  * 
  *     KEYW  (keyword)          - name is upper case version of keyword
@@ -19,9 +20,6 @@ console = imports.console.console;
  *     STRN  (string)           - name is DOBULE_QUOTE, SINGLE_QUOTE
  *     NUMB  (number)           - name is OCTAL,DECIMAL,HEC_DEC
  *     REGX   (reg.expression)  - name is REGX
- *  @prop name {String} see type details above
- *  @prop identifier {Identifier} identifier class if relivant
- * 
  * 
  * 
  * old mappings:
@@ -30,8 +28,14 @@ console = imports.console.console;
  * Script.TOKassign  = data == '='
  * Script.TOKsemicolon data == '';
  * 
+ * </PRE>
  * 
- * 
+ *  @scope JSDOC 
+ *  @class Token
+ *  @param {String} data  raw value of token
+ *  @param {String} type  type of token
+ *  @param {String} name  see type details above
+ *  @param {JSDOC.Identifier} identifier  identifier class if relivant
 */
 
 Token = XObject.define(
@@ -49,6 +53,27 @@ Token = XObject.define(
     }, 
     Object, 
     {
+        /** @type {String} The raw text of the token */
+        data : false,
+        /** @type {String} The type of the token */
+        type : false,
+        /** @type {String} name of the token (eg. "MULTI_LINE_COMM" ) - see table above */
+        name : false,
+        /** @type {Number} line the token occurs on. */
+        line : false,
+        /** @type {String} white or comment prefix for rebuilding source*/
+        prefix : false,
+        /** @type {String} used by packer/ scopeparser to store what is actually output for this */
+        outData : false,// used by packer/scopeparser
+        /** @type {String} the identifier refered to (mangled by packer) */
+        identifier : false, // used by scope
+        /** @type {Number} numberic identifier for token */
+        id : false,
+        /** @type {String} the comments that come before the token? (TBC) */
+        comment : false,
+        /** @type {JSDOC.DocTag} assigned in JSDOC.Compiler that relates to this token. */
+        jsdoc : false,
+        
          toString: function()
         {
             return 'line:' + this.line + ', type:' + this.type +