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.

parse.js 1.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.parseAsync = exports.parseSync = exports.parse = 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 _parser = require("./parser");
  15. var _normalizeOpts = require("./transformation/normalize-opts");
  16. const parseRunner = _gensync()(function* parse(code, opts) {
  17. const config = yield* (0, _config.default)(opts);
  18. if (config === null) {
  19. return null;
  20. }
  21. return yield* (0, _parser.default)(config.passes, (0, _normalizeOpts.default)(config), code);
  22. });
  23. const parse = function parse(code, opts, callback) {
  24. if (typeof opts === "function") {
  25. callback = opts;
  26. opts = undefined;
  27. }
  28. if (callback === undefined) return parseRunner.sync(code, opts);
  29. parseRunner.errback(code, opts, callback);
  30. };
  31. exports.parse = parse;
  32. const parseSync = parseRunner.sync;
  33. exports.parseSync = parseSync;
  34. const parseAsync = parseRunner.async;
  35. exports.parseAsync = parseAsync;