// valac TreeBuilder.vala --pkg libvala-0.24 --pkg posix -o /tmp/treebuilder
namespace Palete {
- 1
- /*public class ValaSourceNotice : Object {
- public string file;
- public int line;
- public string message;
- public string type;
- public ValaSourceNotice( string type, string file, int line, string message) {
- this.file =f ;
- this.line =l;
- this.type =t;
- this.message = m;
- }
- }
- */
+
public class ValaSourceReport : Vala.Report {
public Gee.HashMap<int,string> line_errors;
- public void compile_notice(string type, string file, int line, string message) {
+ public void compile_notice(string type, string filename, int line, string message) {
GLib.Idle.add(() => {
- this.file.compile_notice(type,file,line,message);
+ this.file.compile_notice(type,filename,line,message);
return false;
});
}
hash.set(prop, newval);
var tmpstring = JsRender.NodeToVala.mungeFile(this.file);
+ hash.set(prop, old);
+ //print("%s\n", tmpstring);
var bits = tmpstring.split("/*--VALACHECK-START--*/");
var offset =0;
if (bits.length > 0) {
//this.dumpCode(tmpstring);
//print("offset %d\n", offset);
yield this.checkStringThread(tmpstring);
- hash.set(prop, old);
+
// modify report
var iter = this.report.line_errors.map_iterator();
var cg = pr.compilegroups.get(this.file.build_module);
for (var i = 0; i < cg.sources.size; i++) {
var path = pr.resolve_path(
- pr.resolve_path_combine_path(pr.firstPath(),cg.sources.get(i)));
-
- if (!FileUtils.test(path, FileTest.EXISTS)) {
+ pr.resolve_path_combine_path(pr.firstPath(),cg.sources.get(i)));
+
+ if (!FileUtils.test(path, FileTest.EXISTS)) {
continue;
}
//context.add_external_package ("libvala-0.24");
- this.compile_notice("START", "", 0, "");
+ this.report.compile_notice("START", "", 0, "");
//add_documented_files (context, settings.source_files);
((ValaSourceReport)context.report).dump();
Vala.CodeContext.pop ();
- this.compile_notice("END", "", 0, "");
+ this.report.compile_notice("END", "", 0, "");
return this.report.line_errors;
}
print("check got errors");
((ValaSourceReport)context.report).dump();
Vala.CodeContext.pop ();
- this.compile_notice("END", "", 0, "");
+ this.report.compile_notice("END", "", 0, "");
return this.report.line_errors;
}
*/
Vala.CodeContext.pop ();
- this.compile_notice("END", "", 0, "");
+ this.report.compile_notice("END", "", 0, "");
print("%s\n", valac);
print("ALL OK?\n");
return this.report.line_errors;