projects
/
gnome.introspection-doc-generator
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
4dff92e
)
JSDOC/Packer.js
author
alan
<alan@alanfast.akbkhome.com>
Wed, 21 Apr 2010 05:47:01 +0000
(13:47 +0800)
committer
alan
<alan@alanfast.akbkhome.com>
Wed, 21 Apr 2010 05:47:01 +0000
(13:47 +0800)
JSDOC/Packer.js
patch
|
blob
|
history
diff --git
a/JSDOC/Packer.js
b/JSDOC/Packer.js
index
3155df3
..
8f7edff
100644
(file)
--- a/
JSDOC/Packer.js
+++ b/
JSDOC/Packer.js
@@
-251,15
+251,15
@@
Packer.prototype = {
pack : function (str,fn,minfile)
{
pack : function (str,fn,minfile)
{
- var tr = new TokenReader();
+ var tr = new TokenReader(
{ keepDocs :true, keepWhite : true, keepComments : true, sepIdents : true }
);
this.timerPrint("START" + fn);
// we can load translation map here...
this.timerPrint("START" + fn);
// we can load translation map here...
- var toks = tr.tokenize(
str,false
); // dont merge xxx + . + yyyy etc.
+ var toks = tr.tokenize(
new TextStream(str)
); // dont merge xxx + . + yyyy etc.
// at this point we can write a language file...
// at this point we can write a language file...
- if (this.translate) {
+ if (this.translate
Json
) {
this.writeTranslateFile(fn, minfile, tr.translateMap);
}
this.writeTranslateFile(fn, minfile, tr.translateMap);
}
@@
-267,12
+267,9
@@
Packer.prototype = {
// and replace if we are generating a different language..
// and replace if we are generating a different language..
-
-
-
this.timerPrint("Tokenized");
//return;//
this.timerPrint("Tokenized");
//return;//
- var sp = new ScopeParser(new TokenStream(toks
, str.length
));
+ var sp = new ScopeParser(new TokenStream(toks));
this.timerPrint("Converted to Parser");
sp.packer = this;
sp.buildSymbolTree();
this.timerPrint("Converted to Parser");
sp.packer = this;
sp.buildSymbolTree();
@@
-284,6
+281,19
@@
Packer.prototype = {
this.timerPrint("Compressed");
return out;
this.timerPrint("Compressed");
return out;
+
+
+
+ var ts = new TokenStream(toks);
+ // ts.dump();
+ var sp = new ScopeParser(ts);
+ sp.buildSymbolTree();
+ sp.mungeSymboltree();
+ print(sp.warnings.join("\n"));
+ var out = CompressWhite(sp.ts);
+ return out;
+
+
},
timerPrint: function (str) {
},
timerPrint: function (str) {