1 //<script type="text/javscript">
3 XObject = imports.XObject.XObject;
7 console = imports.console.console;
9 // make sure parent is loaded..
10 RooFile = imports.RooFile..RooFile;
14 * this takes our collased file, and turns it into the config array..
25 GtkFile = XObject.define(
28 GtkFile.superclass.constructor.call(this, ar);
29 // console.log("STARTING OUTPUT");
45 // function create() { return;
47 var pos = this.lookFor( 'function');
50 // standard create format.
52 if (pos > -1 && this.tokens[pos+1].data == 'create') {
53 var tree = this.tokens[pos+3].items[0][1].props;
54 this.cfg= this.parseProps(tree);
57 GtkFile.superclass.parse.call(this);
69 parseImports : function()
71 // console.dump(this.tokens);
74 var pos = this.lookFor('=');
79 var k = this.look(-1, true);
80 var v = this.look(1, true);
81 // Seed.print(k.data + " => " + v.data);
83 /// finish!!! - not an import ...
85 if (!v.data.match(/^imports/)) {
91 if (v.data.match(/^imports\.gi/)) {
93 this.giImports.push(v.data.replace(/imports\.gi\./, ''));
99 // two types of import left
101 if (v.data.match(/^imports\./)) {
102 this.imports[k.data] = v.data.replace(/imports\./, '') + '.js';
108 if (this.lookFor('[') > this.lookFor('=')) {
111 var bpos = this.lookFor('[');
112 // console.dump(this.tokens[bpos]);
114 this.imports[k.data] = this.tokens[bpos].items[0][0].toJS();
119 // console.dump(this.giImports);
120 // console.dump(this.imports);