projects
/
app.Builder.js
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Revert "File.js"
[app.Builder.js]
/
JsParser.js
diff --git
a/JsParser.js
b/JsParser.js
index
f49d0a0
..
adbc921
100644
(file)
--- a/
JsParser.js
+++ b/
JsParser.js
@@
-19,8
+19,9
@@
Collapse = imports.JSDOC.Collapse.Collapse;
* Current issues:
* - xtype is combined on generated files. (not xns + xtype)
* - listeners are prefixed with '|' ...
* Current issues:
* - xtype is combined on generated files. (not xns + xtype)
* - listeners are prefixed with '|' ...
- *
- *
+ * - modkey is not getting picked up..
+ * - suspect some of the elements are not getting flattened
+ * - parent on
*/
JsParser = XObject.define(
*/
JsParser = XObject.define(
@@
-227,11
+228,28
@@
JsParser = XObject.define(
throw "could not find top props...";
}
throw "could not find top props...";
}
+ //print(JSON.stringify(topp,null,4));
this.cfg = this.parseProps(topp);
this.cfg = this.parseProps(topp);
- this.cfg.name = this.tokens[3].data;
+ for(var k in this.cfg) {
+ this.cfg[k.replace(/^\|/, '')] = this.cfg[k];
+ }
+ if (this.cfg.name) {
+ this.cfg.title = this.cfg.name;
+ delete this.cfg.name;
+ }
+ // this.cfg.fullname = this.cfg.name;
this.cfg.type = 'Roo';
this.cfg.type = 'Roo';
+
+
+ // looking for parent / name..
+
+
+ this.cfg.modOrder = this.cfg.modKey.split('-').shift();
+ print(JSON.stringify(this.cfg,null,4));
+
+
// ( { add { this.panel ( {
var cfg = this.tokens[7].items[0][0].props.add.val[2].items[2][3].items[0][0].props;
this.cfg.items = [ this.parseProps(cfg) ];
// ( { add { this.panel ( {
var cfg = this.tokens[7].items[0][0].props.add.val[2].items[2][3].items[0][0].props;
this.cfg.items = [ this.parseProps(cfg) ];
@@
-247,7
+265,7
@@
JsParser = XObject.define(
var cfg = this.tokens[2].props.create.val[2].items[1][3].items[0][0].props;
var cfg = this.tokens[2].props.create.val[2].items[1][3].items[0][0].props;
- his.cfg.type = 'Roo';
+
t
his.cfg.type = 'Roo';
//console.dump(this.tokens);
//print(JSON.stringify(cfg,null,4)); Seed.quit();
//console.dump(this.tokens);
//print(JSON.stringify(cfg,null,4)); Seed.quit();
@@
-404,12
+422,11
@@
JsParser = XObject.define(
ret[kv] = add;
continue;
}
ret[kv] = add;
continue;
}
- var fake_array = {
- xtype : 'Array.' + kv,
- '*prop' : kv,
- items : add
- }
- fakeItems.push(fake_array);
+ add.forEach(function(a) {
+ a['*prop'] = kv + '[]';
+ fakeItems.push(a);
+ });
+
continue;
}
// raw array
continue;
}
// raw array
@@
-466,8
+483,8
@@
JsParser = XObject.define(
}
}
}
}
-
- ret[ '|' + kv ] = this.
expand(o[k].val
);
+ // finally give up..
+ ret[ '|' + kv ] = this.
clean_body(this.expand(o[k].val)
);
}
if (!ret.items && fakeItems.length) {
}
if (!ret.items && fakeItems.length) {
@@
-507,7
+524,7
@@
JsParser = XObject.define(
{
var ret = '';
//print(JSON.stringify(ar,null,4));
{
var ret = '';
//print(JSON.stringify(ar,null,4));
-
+
for(var i =0 ; i < ar.length -1; i++) {
ret += ar[i].toRaw();
}
for(var i =0 ; i < ar.length -1; i++) {
ret += ar[i].toRaw();
}
@@
-549,8
+566,8
@@
JsParser = XObject.define(
}
ar.push(l.substring(mindent));
});
}
ar.push(l.substring(mindent));
});
- print(str);
- print(JSON.stringify(ar,null,4));
+
//
print(str);
+
//
print(JSON.stringify(ar,null,4));
return ar.join("\n");
return ar.join("\n");