resources/RooUsage.txt
[app.Builder.js] / src / JsRender / Node.vala
index e805983..cd10119 100644 (file)
@@ -141,8 +141,8 @@ public class JsRender.Node : Object {
        }
        
        public void setLine(int line, string type, string prop) {
-               if (this.line_map.has_key(line) {
-                       if  this.line_map.get(line) != ":e"  ) {
+               if (this.line_map.has_key(line)) {
+                       if  (this.line_map.get(line) != "e:"  ) {
                                return;
                        }
                } else {
@@ -241,6 +241,26 @@ public class JsRender.Node : Object {
                return null;
        
        }
+       
+       public bool getPropertyRange(string prop, out int start, out int end)
+       {
+               start = -1;
+               foreach(int el in this.lines) {
+                       if (start < 0) {
+                               if (this.line_map.get(el) == prop) {
+                                       start = el;
+                                       end = el;
+                               }
+                               continue;
+                       }
+                       end = el -1;
+                       break;
+               }
+               return start > -1;
+       
+       
+       }
+       
        public void dumpProps(string indent = "")
        {
                print("%s:\n" , this.fqn());