From 4f25b1b5aa0b684f58123d5175160e8b8be2ce00 Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Tue, 19 May 2015 13:02:34 +0800 Subject: [PATCH] src/JsRender/NodeToVala.vala --- src/JsRender/NodeToVala.vala | 54 +++++++++++++++++++----------------- 1 file changed, 28 insertions(+), 26 deletions(-) diff --git a/src/JsRender/NodeToVala.vala b/src/JsRender/NodeToVala.vala index ed9ae7637..89bd9eee4 100644 --- a/src/JsRender/NodeToVala.vala +++ b/src/JsRender/NodeToVala.vala @@ -369,34 +369,36 @@ public class JsRender.NodeToVala : Object { void addValaCtor() { - - // .vala props.. - - string[] cargs = {}; - var cargs_str = ""; - // ctor.. - this.ret += "\n" + this.pad + "// ctor \n"; - if (this.node.has("* args")) { - // not sure what this is supposed to be ding.. - - cargs_str = ", " + this.node.get("* args"); - //var ar = this.node.get("* args");.split(","); - //for (var ari =0; ari < ar.length; ari++) { - // cargs += (ar[ari].trim().split(" ").pop(); - // } - } - if (this.depth < 1) { - this.ret += this.pad + "public " + this.xcls + "(" + - cargs_str +")\n" + this.pad + "{\n"; - } else { - - //code - - this.ret+= this.pad + "public " + this.xcls + "(" + - this.top.xcls + " _owner " + cargs_str + ")\n" + this.pad + "{\n"; + // .vala props.. + + string[] cargs = {}; + var cargs_str = ""; + // ctor.. + this.addLine(); + this.addLine(this.pad + "// ctor"); + + if (this.node.has("* args")) { + // not sure what this is supposed to be ding.. + + cargs_str = ", " + this.node.get("* args"); + //var ar = this.node.get("* args");.split(","); + //for (var ari =0; ari < ar.length; ari++) { + // cargs += (ar[ari].trim().split(" ").pop(); + // } } - + + if (this.depth < 1) { + this.addLine(this.pad + "public " + this.xcls + "(" + + cargs_str +")\n" + this.pad + "{\n"); + } else { + + //code + + this.ret+= this.pad + "public " + this.xcls + "(" + + this.top.xcls + " _owner " + cargs_str + ")\n" + this.pad + "{\n"; + } + } void addUnderThis() -- 2.39.2