rconv.js
[gnome.introspection-doc-generator] / rconv.js
1 /**
2  *
3  * This is a test file to convert appbuilder style application code
4  *  into javascript structures.
5  * 
6  *
7  *
8  */
9
10 var RooFile = imports.JSDOC.RooFile.RooFile;
11 var File = imports.File.File;
12
13
14
15
16 var args = Array.prototype.slice.call(Seed.argv);
17
18 args.shift();
19 args.shift();
20 print(JSON.stringify(args, null,4));
21 //Seed.quit();
22
23
24
25 var tr = new  TokenReader(  { 
26     keepDocs :true, 
27     keepWhite : true,  
28     keepComments : true, 
29     sepIdents : true,
30     collapseWhite : false,
31     filename : fn
32 });
33
34 var str = File.read(args[0])
35
36 var toks = tr.tokenize(new TextStream(str));  
37
38 var rf = new RooFile(toks);
39
40 rf.parse();
41
42 print(JSON.stringify(rf.cfg, null,4));