projects
/
gnome.introspection-doc-generator
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
JSDOC/Packer.vala
[gnome.introspection-doc-generator]
/
JSDOC
/
Packer.vala
diff --git
a/JSDOC/Packer.vala
b/JSDOC/Packer.vala
index
5d5f90c
..
21782f1
100644
(file)
--- a/
JSDOC/Packer.vala
+++ b/
JSDOC/Packer.vala
@@
-100,6
+100,11
@@
namespace JSDOC
// list of files to compile...
Gee.ArrayList<string> files;
// list of files to compile...
Gee.ArrayList<string> files;
+
+
+ public string activeFile = "";
+
+
public string out = ""; // if no target is specified - then this will contain the result
public Packer(string target, string targetDebug = "")
public string out = ""; // if no target is specified - then this will contain the result
public Packer(string target, string targetDebug = "")
@@
-315,20
+320,21
@@
namespace JSDOC
*/
print("MERGING SOURCE");
*/
print("MERGING SOURCE");
- for(var i=0; i < this.files.
length
; i++) {
+ for(var i=0; i < this.files.
size
; i++) {
var file = this.files[i];
var file = this.files[i];
- var minfile = this.tmpDir +
'/' + file.replace('/', '.'
);
+ var minfile = this.tmpDir +
"/" + file.replace("/", "."
);
- if (
!File.exists(minfile
)) {
+ if (
FileUtils.test(minfile, FileTest.EXISTS
)) {
continue;
}
continue;
}
- var str = File.read(minfile);
- print("using MIN FILE "+ minfile);
- if (str.length) {
+ string str;
+ FileUtils.get_contents(minfile, out str);
+ print("using MIN FILE %s\n", minfile);
+ if (str.length > 0) {
if (this.targetStream != null) {
if (this.targetStream != null) {
- this.targetStream.write(
"//" + file + "\n"
);
- this.targetStream.write(
str + "\n"
);
+ this.targetStream.write(
("//" + file + "\n").data
);
+ this.targetStream.write(
(str + "\n").data
);
} else {
this.out += "//" + file + "\n";
} else {
this.out += "//" + file + "\n";
@@
-342,7
+348,9
@@
namespace JSDOC
}
print("Output file: " + this.target);
}
print("Output file: " + this.target);
- if (this.debugTarget) print("Output debug file: " + this.debugTarget);
+ if (this.targetDebug.length > 0) {
+ print("Output debug file: " + this.targetDebug);
+ }
@@
-367,12
+375,10
@@
namespace JSDOC
tr.sepIdents = true;
tr.collapseWhite = false;
tr.filename = fn;
tr.sepIdents = true;
tr.collapseWhite = false;
tr.filename = fn;
-
- this.timerPrint("START" + fn);
-
+
// we can load translation map here...
// we can load translation map here...
-
var
toks = tr.tokenize(new TextStream(str)); // dont merge xxx + . + yyyy etc.
+
TokenArray
toks = tr.tokenize(new TextStream(str)); // dont merge xxx + . + yyyy etc.
@@
-383,26
+389,26
@@
namespace JSDOC
//var ts = new TokenStream(toks);
//print(JSON.stringify(toks, null,4 )); Seed.quit();
//var ts = new TokenStream(toks);
//print(JSON.stringify(toks, null,4 )); Seed.quit();
- var ts = new Collapse(toks);
+ var ts = new Collapse(toks
.tokens
);
// print(JSON.stringify(ts.tokens, null,4 )); Seed.quit();
//return;//
var sp = new ScopeParser(ts);
// print(JSON.stringify(ts.tokens, null,4 )); Seed.quit();
//return;//
var sp = new ScopeParser(ts);
-
- sp.packer = this;
+
+
//
sp.packer = this;
sp.buildSymbolTree();
sp.mungeSymboltree();
sp.buildSymbolTree();
sp.mungeSymboltree();
-
- print(sp.warnings.join("\n"));
+ sp.printWarnings();
+
//
print(sp.warnings.join("\n"));
- var outf = CompressWhite(new TokenStream(toks), this, this.keepWhite); // do not kill whitespace..
+ var outf = CompressWhite(new TokenStream(toks
.tokens
), this, this.keepWhite); // do not kill whitespace..
- if (out.length > 0) {
- FileUtils.
pu
t_contents(minfile, outf);
+ if (out
f
.length > 0) {
+ FileUtils.
se
t_contents(minfile, outf);
}
}
@@
-416,7
+422,7
@@
namespace JSDOC
public string md5(string str)
{
public string md5(string str)
{
- return GLib.
compute_checksum
_for_string(GLib.ChecksumType.MD5, str);
+ return GLib.
Checksum.compute
_for_string(GLib.ChecksumType.MD5, str);
}
}