NewcommandConfiguration.js 2.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. "use strict";
  2. var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
  3. if (k2 === undefined) k2 = k;
  4. var desc = Object.getOwnPropertyDescriptor(m, k);
  5. if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
  6. desc = { enumerable: true, get: function() { return m[k]; } };
  7. }
  8. Object.defineProperty(o, k2, desc);
  9. }) : (function(o, m, k, k2) {
  10. if (k2 === undefined) k2 = k;
  11. o[k2] = m[k];
  12. }));
  13. var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
  14. Object.defineProperty(o, "default", { enumerable: true, value: v });
  15. }) : function(o, v) {
  16. o["default"] = v;
  17. });
  18. var __importStar = (this && this.__importStar) || function (mod) {
  19. if (mod && mod.__esModule) return mod;
  20. var result = {};
  21. if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
  22. __setModuleDefault(result, mod);
  23. return result;
  24. };
  25. var __importDefault = (this && this.__importDefault) || function (mod) {
  26. return (mod && mod.__esModule) ? mod : { "default": mod };
  27. };
  28. var _a;
  29. Object.defineProperty(exports, "__esModule", { value: true });
  30. exports.NewcommandConfiguration = void 0;
  31. var Configuration_js_1 = require("../Configuration.js");
  32. var NewcommandItems_js_1 = require("./NewcommandItems.js");
  33. var NewcommandUtil_js_1 = __importDefault(require("./NewcommandUtil.js"));
  34. require("./NewcommandMappings.js");
  35. var ParseMethods_js_1 = __importDefault(require("../ParseMethods.js"));
  36. var sm = __importStar(require("../SymbolMap.js"));
  37. var init = function (config) {
  38. new sm.DelimiterMap(NewcommandUtil_js_1.default.NEW_DELIMITER, ParseMethods_js_1.default.delimiter, {});
  39. new sm.CommandMap(NewcommandUtil_js_1.default.NEW_COMMAND, {}, {});
  40. new sm.EnvironmentMap(NewcommandUtil_js_1.default.NEW_ENVIRONMENT, ParseMethods_js_1.default.environment, {}, {});
  41. config.append(Configuration_js_1.Configuration.local({ handler: { character: [],
  42. delimiter: [NewcommandUtil_js_1.default.NEW_DELIMITER],
  43. macro: [NewcommandUtil_js_1.default.NEW_DELIMITER,
  44. NewcommandUtil_js_1.default.NEW_COMMAND],
  45. environment: [NewcommandUtil_js_1.default.NEW_ENVIRONMENT]
  46. },
  47. priority: -1 }));
  48. };
  49. exports.NewcommandConfiguration = Configuration_js_1.Configuration.create('newcommand', {
  50. handler: {
  51. macro: ['Newcommand-macros']
  52. },
  53. items: (_a = {},
  54. _a[NewcommandItems_js_1.BeginEnvItem.prototype.kind] = NewcommandItems_js_1.BeginEnvItem,
  55. _a),
  56. options: { maxMacros: 1000 },
  57. init: init
  58. });
  59. //# sourceMappingURL=NewcommandConfiguration.js.map