X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=src%2FJsRender%2FJsRender.vala;h=db19fe2c8511e674528026d130b295da8670705f;hb=HEAD;hp=0e026687c2d766149db5d274c9cd615885d890a9;hpb=7468f7df29b068197ff25be4d4a442b675b24b45;p=app.Builder.js diff --git a/src/JsRender/JsRender.vala b/src/JsRender/JsRender.vala index 0e026687c..db19fe2c8 100644 --- a/src/JsRender/JsRender.vala +++ b/src/JsRender/JsRender.vala @@ -74,7 +74,7 @@ namespace JsRender { this.content_type = ""; this.build_module = ""; this.loaded = false; - print("JsRender.cto() - reset transStrings\n"); + //print("JsRender.cto() - reset transStrings\n"); this.transStrings = new Gee.HashMap (); // should use basename reallly... @@ -335,39 +335,7 @@ namespace JsRender { } - /** - * - * munge JSON tree into Javascript code. - * - * NOTE - needs a deep copy of original tree, before starting.. - * - so that it does not modify current.. - * - * FIXME: + or / prefixes to properties hide it from renderer. - * FIXME: '*props' - not supported by this.. ?? - upto rendering code.. - * FIXME: needs to understand what properties might be translatable (eg. double quotes) - * - * @arg {object} obj the object or array to munge.. - * @arg {boolean} isListener - is the array being sent a listener.. - * @arg {string} pad - the padding to indent with. - */ - public string mungeToString(string pad) - { - if (this.tree == null) { - return ""; - } - var x = new NodeToJs(this.tree, this.doubleStringProps, pad, null); - - var ret = x.munge(); - var nret = x.ret; - - // output both files.. so we can diff them... - this.writeFile("/tmp/old.js", ret); - this.writeFile("/tmp/new.js", nret); - return ret; - - - } public Node? lineToNode(int line) { if (this.tree == null) { @@ -382,6 +350,7 @@ namespace JsRender { public abstract void save(); public abstract void saveHTML(string html); public abstract string toSource() ; + public abstract string toSourceCode() ; // used by commandline tester.. public abstract void setSource(string str); public abstract string toSourcePreview() ; public abstract void removeFiles() ;