File = imports.File.File;
TokenReader = imports['JSDOC/TokenReader.js'].TokenReader;
+ScopeParser = imports['JSDOC/ScopeParser.js'].ScopeParser;
+TokenStream = imports['JSDOC/TokenStream.js'].TokenStream;
/**
* @class JSDOC.Packer
* Create a new packer
this.timerPrint("Tokenized");
//return;//
- var sp = new JSDOC.ScopeParser(new JSDOC.TokenStream(toks, str.length));
+ var sp = new ScopeParser(new TokenStream(toks, str.length));
this.timerPrint("Converted to Parser");
sp.packer = this;
sp.buildSymbolTree();
var l = '';
var _tout = {}
- File.write(transmd5, '');
+ File.write(transmd5, '');
for(v in map) {
File.append(transfile, l + "\n\t \"" + v + '" : "' + v + '"');
l = ',';
// strings are raw... - as the where encoded to start with!!!
- File.append(transmd5, '_T[' + (ffn + '-' + v).md5().toSource() + ']="'+v+"\";\n");
+ File.append(transmd5, '_T[' + this.md5(ffn + '-' + v) + ']="'+v+"\";\n");
}
File.append(transfile, "\n},"); // always one trailing..
},
+ md5 : function (string)
+ {
+
+ return GLib.compute_checksum_for_string(GLib.ChecksumType.MD5, string, string.length);
+
+ }
stringHandler : function(tok)
{
//print("STRING HANDLER");
var ff = this.activeFile.split('/');
var ffn = ff[ff.length-1];
- return '_T[' + (ffn + '-' + sval).md5().toSource() + ']';
+ return '_T[' + this.md5(ffn + '-' + sval) + ']';
}