web.js 522 B

1234567891011121314151617181920212223
  1. define(function(require){
  2. var parser = require("openscad-parser");
  3. var Globals = require("Globals");
  4. var support = require("openscad-parser-support");
  5. return {
  6. parser: parser,
  7. parse: function(text){
  8. if (parser.yy === undefined){
  9. parser.yy = {}
  10. }
  11. var openSCADText = Globals.preParse(text);
  12. var openJSCADResult = parser.parse(openSCADText);
  13. return openJSCADResult.lines.join('\n');
  14. }
  15. }
  16. });