projects
/
app.Builder.js
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
resources/RooUsage.txt
[app.Builder.js]
/
src
/
JsRender
/
NodeToVala.vala
diff --git
a/src/JsRender/NodeToVala.vala
b/src/JsRender/NodeToVala.vala
index
4d718ee
..
1350c0d
100644
(file)
--- a/
src/JsRender/NodeToVala.vala
+++ b/
src/JsRender/NodeToVala.vala
@@
-1,8
+1,8
@@
/**
*
/**
*
- * Code to convert node tree to
Javascript
...
+ * Code to convert node tree to
Vala
...
*
*
- * usage : x = (new JsRender.NodeTo
Js
(node)).munge();
+ * usage : x = (new JsRender.NodeTo
Vala
(node)).munge();
*
*
*
*
*
*
@@
-66,7
+66,10
@@
public class JsRender.NodeToVala : Object {
node.line_end = this.cur_line;
node.lines = new Gee.ArrayList<int>();
node.line_map = new Gee.HashMap<int,string>();
node.line_end = this.cur_line;
node.lines = new Gee.ArrayList<int>();
node.line_map = new Gee.HashMap<int,string>();
-
+ if (parent == null) {
+ node.node_lines = new Gee.ArrayList<int>();
+ node.node_lines_map = new Gee.HashMap<int,Node>();
+ }
}
}
@@
-188,13
+191,15
@@
public class JsRender.NodeToVala : Object {
public void addLine(string str= "")
{
this.cur_line++;
public void addLine(string str= "")
{
this.cur_line++;
- this.ret += "/*%d*/ ".printf(this.cur_line-1) + str + "\n";
+ //this.ret += "/*%d*/ ".printf(this.cur_line-1) + str + "\n";
+ this.ret += str + "\n";
}
public void addMultiLine(string str= "")
{
}
public void addMultiLine(string str= "")
{
- var l = this.cur_line;
+
this.cur_line += str.split("\n").length;
this.cur_line += str.split("\n").length;
- this.ret += "/*%d*/ ".printf(l) + str + "\n";
+ //this.ret += "/*%d*/ ".printf(l) + str + "\n";
+ this.ret += str + "\n";
}
}
@@
-217,6
+222,9
@@
public class JsRender.NodeToVala : Object {
// class header..
// class xxx { WrappedGtk el; }
this.node.line_start = this.cur_line;
// class header..
// class xxx { WrappedGtk el; }
this.node.line_start = this.cur_line;
+
+ this.top.node.setNodeLine(this.cur_line, this.node);
+
this.addLine(inpad + "public class " + this.xcls + " : Object");
this.addLine(this.inpad + "{");
this.addLine(inpad + "public class " + this.xcls + " : Object");
this.addLine(this.inpad + "{");
@@
-570,7
+578,7
@@
public class JsRender.NodeToVala : Object {
var iter = cls.props.map_iterator();
while (iter.next()) {
var p = iter.get_key();
var iter = cls.props.map_iterator();
while (iter.next()) {
var p = iter.get_key();
- print("Check Write %s\n", p);
+
//
print("Check Write %s\n", p);
if (!this.node.has(p)) {
continue;
}
if (!this.node.has(p)) {
continue;
}
@@
-814,7
+822,7
@@
public class JsRender.NodeToVala : Object {
}
var iter = this.node.items.list_iterator();
}
var iter = this.node.items.list_iterator();
- var i = -1;
+
while (iter.next()) {
this.addMultiLine(this.mungeChild(iter.get()));
}
while (iter.next()) {
this.addMultiLine(this.mungeChild(iter.get()));
}