}
public void setLine(int line, string type, string prop) {
- if (this.line_map.has_key(line) && this.line_map.get(line) != ":e" ) {
- return;
+ if (this.line_map.has_key(line)) {
+ if (this.line_map.get(line) != "e:" ) {
+ return;
+ }
+ } else {
+ this.lines.add(line);
}
- this.lines.add(line);
this.line_map.set(line, type + ":" + prop);
GLib.debug("setLine %d, %s", line, type + ":" + prop);
}
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());