projects
/
app.Builder.js
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
15cbf88
)
src/JsRender/NodeToVala.vala
author
Alan Knowles
<alan@roojs.com>
Tue, 19 May 2015 06:09:58 +0000
(14:09 +0800)
committer
Alan Knowles
<alan@roojs.com>
Tue, 19 May 2015 06:09:58 +0000
(14:09 +0800)
src/JsRender/NodeToVala.vala
patch
|
blob
|
history
diff --git
a/src/JsRender/NodeToVala.vala
b/src/JsRender/NodeToVala.vala
index
4f76c72
..
dd5c840
100644
(file)
--- a/
src/JsRender/NodeToVala.vala
+++ b/
src/JsRender/NodeToVala.vala
@@
-66,11
+66,8
@@
public class JsRender.NodeToVala : Object {
node.line_end = this.cur_line;
node.lines = new Gee.ArrayList();
node.line_map = new Gee.HashMap<int,string>();
node.line_end = this.cur_line;
node.lines = new Gee.ArrayList();
node.line_map = new Gee.HashMap<int,string>();
-
-
-
}
public int vcnt = 0;
}
public int vcnt = 0;
@@
-315,7
+312,7
@@
public class JsRender.NodeToVala : Object {
}
if (vv[0] == "@") {
}
if (vv[0] == "@") {
- this.node.
proplines.set(k, this.cur_line
);
+ this.node.
setLine(this.cur_line, "p", k
);
this.addLine(this.pad + "public signal" + k.substring(1) + " " + iter.get_value() + ";");
this.ignore(k);
this.addLine(this.pad + "public signal" + k.substring(1) + " " + iter.get_value() + ";");
this.ignore(k);
@@
-339,8
+336,8
@@
public class JsRender.NodeToVala : Object {
}
this.myvars.add(k);
}
this.myvars.add(k);
-
- this.node.proplines.set(k, this.cur_line);
+ this.node.setLine(this.cur_line, "p", k);
+
this.addLine(this.pad + "public " +
(k[0] == '$' || k[0] == '#' ? k.substring(2) : k ) + ";");
this.addLine(this.pad + "public " +
(k[0] == '$' || k[0] == '#' ? k.substring(2) : k ) + ";");
@@
-457,7
+454,7
@@
public class JsRender.NodeToVala : Object {
}
*/
if (this.node.has("* ctor")) {
}
*/
if (this.node.has("* ctor")) {
- this.node.
proplines.set("* ctor", this.cur_line
);
+ this.node.
setLine(this.cur_line, "p", "* ctor"
);
this.addLine(this.ipad + "this.el = " + this.node.get("* ctor")+ ";");
return;
}
this.addLine(this.ipad + "this.el = " + this.node.get("* ctor")+ ";");
return;
}
@@
-505,12
+502,13
@@
public class JsRender.NodeToVala : Object {
args += v;
}
args += v;
}
- this.node.proplines.set("* xtype", this.cur_line);
+ this.node.setLine(this.cur_line, "p", "* xtype");
+
this.addLine(this.ipad + "this.el = new " + cls + "( "+ string.joinv(", ",args) + " );") ;
return;
}
this.addLine(this.ipad + "this.el = new " + cls + "( "+ string.joinv(", ",args) + " );") ;
return;
}
- this.node.
proplines.set("* xtype", this.cur_line)
;
+ this.node.
setLine(this.cur_line, "p", "* xtype");
;
this.addLine(this.ipad + "this.el = new " + this.cls + "();");
this.addLine(this.ipad + "this.el = new " + this.cls + "();");
@@
-699,7
+697,8
@@
public class JsRender.NodeToVala : Object {
this.addLine();
this.addLine(ipad + "// init method");
this.addLine();
this.addLine();
this.addLine(ipad + "// init method");
this.addLine();
- this.node.proplines.set("init", this.cur_line);
+ this.node.setLine(this.cur_line, "p", "init");
+
this.addMultiLine(ipad + this.padMultiline(ipad, this.node.get("init")) );
}
this.addMultiLine(ipad + this.padMultiline(ipad, this.node.get("init")) );
}
@@
-718,11
+717,12
@@
public class JsRender.NodeToVala : Object {
while (iter.next()) {
var k = iter.get_key();
var v = iter.get_value();
while (iter.next()) {
var k = iter.get_key();
var v = iter.get_value();
- this.node.listenlines.set(k, this.cur_line);
- this.addMultiLine(this.ipad + "this.el." + k + ".connect( " +
+
+ this.node.setLine(this.cur_line, "l", k);
+ this.addMultiLine(this.ipad + "this.el." + k + ".connect( " +
this.padMultiline(this.ipad,v) +");");
this.padMultiline(this.ipad,v) +");");
-
}
+ }
}
void addEndCtor()
{
}
void addEndCtor()
{
@@
-795,7
+795,7
@@
public class JsRender.NodeToVala : Object {
// function in the format of {type} (args) { .... }
var kk = k.substring(2);
var vv = iter.get_value();
// function in the format of {type} (args) { .... }
var kk = k.substring(2);
var vv = iter.get_value();
- this.node.
proplines.set(k, this.cur_line
);
+ this.node.
setLine(this.cur_line, "p", k
);
this.addMultiLine(this.pad + "public " + kk + " " + this.padMultiline(this.pad, vv));;
this.addMultiLine(this.pad + "public " + kk + " " + this.padMultiline(this.pad, vv));;