From 43e1e804063058a4f9e650514728510978435ba8 Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Mon, 30 May 2016 16:09:47 +0800 Subject: [PATCH] src/JsRender/Node.vala --- src/JsRender/Node.vala | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/JsRender/Node.vala b/src/JsRender/Node.vala index 794859447..bf9ee8bb8 100644 --- a/src/JsRender/Node.vala +++ b/src/JsRender/Node.vala @@ -134,11 +134,13 @@ public class JsRender.Node : Object { //print("Add node @ %d\n", line); this.node_lines.add(line); this.node_lines_map.set(line, node); + } public void setLine(int line, string type, string prop) { this.lines.add(line); this.line_map.set(line, type + ":" + prop); + GLib.debug("setLine %d, %s", line, type + ":" + prop); } public void sortLines() { //print("sortLines\n"); @@ -221,6 +223,16 @@ public class JsRender.Node : Object { return null; } + void dumpProps(string indent = "") + { + print("%s:\n" + this.fqn()); + foreach(int el in this.node_lines) { + print("%s %s\n", indent, this.line_map.get(el)); + } + foreach(Node n in this.items) { + n.dumpProps(indent + " "); + } + } -- 2.39.2