JSDOC/TokenReader.js
[gnome.introspection-doc-generator] / rconv.js
index 34cb2cb..f40a589 100644 (file)
--- a/rconv.js
+++ b/rconv.js
@@ -2,7 +2,9 @@
  *
  * This is a test file to convert appbuilder style application code
  *  into javascript structures.
- * 
+ *
+ *
+ * Needs to test a while directory convert to-><-from and compare..
  *
  *
  */
@@ -21,7 +23,7 @@ var args = Array.prototype.slice.call(Seed.argv);
 
 args.shift();
 args.shift();
-print(JSON.stringify(args, null,4));
+//print(JSON.stringify(args, null,4));
 //Seed.quit();
 
 
@@ -30,17 +32,32 @@ var tr = new  TokenReader(  {
     keepDocs :true, 
     keepWhite : true,  
     keepComments : true, 
-    sepIdents : true,
-    collapseWhite : false,
-    filename : args[0]
+    sepIdents : false,
+    collapseWhite : true,
+    filename : args[0],
+    ignoreBadGrammer: true
 });
 
 var str = File.read(args[0])
 
 var toks = tr.tokenize(new TextStream(str));  
 
+
 var rf = new RooFile(toks);
+//print(JSON.stringify(rf.tokens, null,4));Seed.quit();
+
+
+
 
 rf.parse();
 
-print(JSON.stringify(rf.cfg, null,4));
\ No newline at end of file
+print("------------ in ------------------");
+print(str);
+print("------------ out ------------------");
+
+print(JSON.stringify(rf.cfg, null,4));
+
+print("------------ was ------------------");
+
+print(File.read(args[0].replace(/\.js$/,'.bjs')));
+