projects
/
app.Builder.js
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
tests/enum.vala
[app.Builder.js]
/
tests
/
TreeBuilder.vala
diff --git
a/tests/TreeBuilder.vala
b/tests/TreeBuilder.vala
index
f648a44
..
325a3c7
100644
(file)
--- a/
tests/TreeBuilder.vala
+++ b/
tests/TreeBuilder.vala
@@
-6,7
+6,15
@@
namespace Palete {
public class ValaSourceReport : Vala.Report {
public class ValaSourceReport : Vala.Report {
+
+
Gee.HashMap<int,string> line_errors;
Gee.HashMap<int,string> line_errors;
+
+ public ValaSourceReport()
+ {
+ base();
+ this.line_errors = new Gee.HashMap<int,string> ();
+ }
public override void err (Vala.SourceReference? source, string message) {
errors++;
public override void err (Vala.SourceReference? source, string message) {
errors++;
@@
-29,13
+37,14
@@
namespace Palete {
}
public class ValaSource : Vala.CodeVisitor {
}
public class ValaSource : Vala.CodeVisitor {
-
- public Vala.CodeContext check (JsRender.Gtk file) {
- // init context:
+ Vala.CodeContext context;
+
+ public ValaSource(JsRender.JsRender file) {
+ base();
+ // init context:
-
- var context = new Vala.CodeContext ();
+ context = new Vala.CodeContext ();
Vala.CodeContext.push (context);
context.experimental = false;
Vala.CodeContext.push (context);
context.experimental = false;
@@
-65,7
+74,7
@@
namespace Palete {
context,
Vala.SourceFileType.SOURCE,
"~~~~~testfile.vala",
context,
Vala.SourceFileType.SOURCE,
"~~~~~testfile.vala",
-
file.toSource(
)
+
NodeToVala.mungeFile(file
)
);
//context.add_source_file (testcode);
);
//context.add_source_file (testcode);
@@
-100,8
+109,9
@@
namespace Palete {
parser.parse (context);
//gir_parser.parse (context);
if (context.report.get_errors () > 0) {
parser.parse (context);
//gir_parser.parse (context);
if (context.report.get_errors () > 0) {
- print("got errors");
- return context;
+ print("parse got errors");
+ Vala.CodeContext.pop (context);
+ return;
}
}
@@
-110,20
+120,23
@@
namespace Palete {
context.check ();
if (context.report.get_errors () > 0) {
print("check got errors");
context.check ();
if (context.report.get_errors () > 0) {
print("check got errors");
- return context;
+ Vala.CodeContext.pop (context);
+ return;
}
}
+ Vala.CodeContext.pop (context);
print("ALL OK?\n");
print("ALL OK?\n");
- return
context
;
+ return;
}
//
// startpoint:
//
}
}
//
// startpoint:
//
}
+}
int main (string[] args) {
int main (string[] args) {
- var a = new
TreeBuilder(
);
+ var a = new
ValaSource(file
);
a.create_valac_tree();
return 0;
}
a.create_valac_tree();
return 0;
}