Software zum Installieren eines Smart-Mirror Frameworks , zum Nutzen von hochschulrelevanten Informationen, auf einem Raspberry-Pi.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

transform-ast.js 1.2KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.transformFromAstAsync = exports.transformFromAstSync = exports.transformFromAst = void 0;
  6. function _gensync() {
  7. const data = require("gensync");
  8. _gensync = function () {
  9. return data;
  10. };
  11. return data;
  12. }
  13. var _config = require("./config");
  14. var _transformation = require("./transformation");
  15. const transformFromAstRunner = _gensync()(function* (ast, code, opts) {
  16. const config = yield* (0, _config.default)(opts);
  17. if (config === null) return null;
  18. if (!ast) throw new Error("No AST given");
  19. return yield* (0, _transformation.run)(config, code, ast);
  20. });
  21. const transformFromAst = function transformFromAst(ast, code, opts, callback) {
  22. if (typeof opts === "function") {
  23. callback = opts;
  24. opts = undefined;
  25. }
  26. if (callback === undefined) {
  27. return transformFromAstRunner.sync(ast, code, opts);
  28. }
  29. transformFromAstRunner.errback(ast, code, opts, callback);
  30. };
  31. exports.transformFromAst = transformFromAst;
  32. const transformFromAstSync = transformFromAstRunner.sync;
  33. exports.transformFromAstSync = transformFromAstSync;
  34. const transformFromAstAsync = transformFromAstRunner.async;
  35. exports.transformFromAstAsync = transformFromAstAsync;