+ Gee.HashMap<int,string> line_errors;
+
+ public ValaSourceReport()
+ {
+ this.line_errors = new Gee.HashMap<int,string> ();
+ }
+
+ public override void err (Vala.SourceReference? source, string message) {
+ errors++;
+ if (source == null) {
+ return;
+ //stderr.printf ("My error: %s\n", message);
+ }
+ if (source.file != "~~~~~testfile.vala") {
+ return;
+ }
+ var pre = "";
+ if (line_errors.has_key(source.begin.line)) {
+ pre = line_errors.get(source.begin.line) + "\n";
+
+ }
+ line_errors.set(source.begin.line, pre + message);
+ }
+
+
+ }
+
+ public class ValaSource : Vala.CodeVisitor {
+
+ public Vala.CodeContext check (JsRender.Gtk file) {
+ // init context:
+
+
+
+ var context = new Vala.CodeContext ();
+ Vala.CodeContext.push (context);
+
+ context.experimental = false;
+ context.experimental_non_null = false;
+ context.vapi_directories = { "/usr/share/vala-0.24/vapi" };
+ context.report.enable_warnings = true;
+ context.metadata_directories = { };
+ context.gir_directories = {};
+ context.report = new ValaSourceReport();