exports.compile = function(code) {
  var ast, objects;
  // parse code, that is text string, and generate ast
  try {
    ast = parser.parse(code);
  } catch (e) {
    return {
      error: e.message
    };
  }
  // generate intermediate object code
  objects = new Interpreter(ast).generate();
  // return package of intermediate products
  return {
    ast: ast,
    objects: objects
  }
}
@@ -48,16 +48,26 @@
 bjects;%0A
+  try %7B%0A  
   // par
@@ -113,24 +113,16 @@
 ate ast%0A
-  try %7B%0A
     ast 
@@ -149,69 +149,8 @@
 ;%0A  
-%7D catch (e) %7B%0A    return %7B%0A      error: e.message%0A    %7D;%0A  %7D%0A
   //
@@ -184,16 +184,18 @@
 ct code%0A
+  
   object
@@ -231,16 +231,79 @@
 rate();%0A
+  %7D catch (e) %7B%0A    return %7B%0A      error: e.message%0A    %7D;%0A  %7D%0A
   // ret

fix #7. add error handling.