diff --git a/dist/lips.cjs b/dist/lips.cjs index fb4b1001..ae787f1a 100644 --- a/dist/lips.cjs +++ b/dist/lips.cjs @@ -31,7 +31,7 @@ * Copyright (c) 2014-present, Facebook, Inc. * released under MIT license * - * build: Fri, 06 Dec 2024 13:48:17 +0000 + * build: Fri, 06 Dec 2024 13:56:22 +0000 */ 'use strict'; @@ -4966,8 +4966,8 @@ var Parser = /*#__PURE__*/function () { }, cleanup); } }, { - key: "parse", - value: function parse(arg) { + key: "prepare", + value: function prepare(arg) { if (arg instanceof LString) { arg = arg.toString(); } @@ -5643,7 +5643,7 @@ function _parse2() { parser = new Parser({ env: env }); - parser.parse(arg); + parser.prepare(arg); } case 2: _context9.next = 5; @@ -12356,7 +12356,7 @@ function InputPort(read) { parser = new Parser({ env: env }); - parser.parse(line); + parser.prepare(line); case 6: return _context14.abrupt("return", _this10.__parser__); case 7: @@ -17393,10 +17393,10 @@ if (typeof window !== 'undefined') { // ------------------------------------------------------------------------- var banner = function () { // Rollup tree-shaking is removing the variable if it's normal string because - // obviously 'Fri, 06 Dec 2024 13:48:17 +0000' == '{{' + 'DATE}}'; can be removed + // obviously 'Fri, 06 Dec 2024 13:56:22 +0000' == '{{' + 'DATE}}'; can be removed // but disabling Tree-shaking is adding lot of not used code so we use this // hack instead - var date = LString('Fri, 06 Dec 2024 13:48:17 +0000').valueOf(); + var date = LString('Fri, 06 Dec 2024 13:56:22 +0000').valueOf(); var _date = date === '{{' + 'DATE}}' ? new Date() : new Date(date); var _format = function _format(x) { return x.toString().padStart(2, '0'); @@ -17436,7 +17436,7 @@ read_only(QuotedPromise, '__class__', 'promise'); read_only(Parameter, '__class__', 'parameter'); // ------------------------------------------------------------------------- var version = 'DEV'; -var date = 'Fri, 06 Dec 2024 13:48:17 +0000'; +var date = 'Fri, 06 Dec 2024 13:56:22 +0000'; // unwrap async generator into Promise var parse = compose(uniterate_async, _parse); diff --git a/dist/lips.esm.js b/dist/lips.esm.js index c3b7cda5..c9275d53 100644 --- a/dist/lips.esm.js +++ b/dist/lips.esm.js @@ -31,7 +31,7 @@ * Copyright (c) 2014-present, Facebook, Inc. * released under MIT license * - * build: Fri, 06 Dec 2024 13:48:17 +0000 + * build: Fri, 06 Dec 2024 13:56:22 +0000 */ function _classApplyDescriptorGet(receiver, descriptor) { @@ -4963,8 +4963,8 @@ var Parser = /*#__PURE__*/function () { }, cleanup); } }, { - key: "parse", - value: function parse(arg) { + key: "prepare", + value: function prepare(arg) { if (arg instanceof LString) { arg = arg.toString(); } @@ -5640,7 +5640,7 @@ function _parse2() { parser = new Parser({ env: env }); - parser.parse(arg); + parser.prepare(arg); } case 2: _context9.next = 5; @@ -12353,7 +12353,7 @@ function InputPort(read) { parser = new Parser({ env: env }); - parser.parse(line); + parser.prepare(line); case 6: return _context14.abrupt("return", _this10.__parser__); case 7: @@ -17390,10 +17390,10 @@ if (typeof window !== 'undefined') { // ------------------------------------------------------------------------- var banner = function () { // Rollup tree-shaking is removing the variable if it's normal string because - // obviously 'Fri, 06 Dec 2024 13:48:17 +0000' == '{{' + 'DATE}}'; can be removed + // obviously 'Fri, 06 Dec 2024 13:56:22 +0000' == '{{' + 'DATE}}'; can be removed // but disabling Tree-shaking is adding lot of not used code so we use this // hack instead - var date = LString('Fri, 06 Dec 2024 13:48:17 +0000').valueOf(); + var date = LString('Fri, 06 Dec 2024 13:56:22 +0000').valueOf(); var _date = date === '{{' + 'DATE}}' ? new Date() : new Date(date); var _format = function _format(x) { return x.toString().padStart(2, '0'); @@ -17433,7 +17433,7 @@ read_only(QuotedPromise, '__class__', 'promise'); read_only(Parameter, '__class__', 'parameter'); // ------------------------------------------------------------------------- var version = 'DEV'; -var date = 'Fri, 06 Dec 2024 13:48:17 +0000'; +var date = 'Fri, 06 Dec 2024 13:56:22 +0000'; // unwrap async generator into Promise var parse = compose(uniterate_async, _parse); diff --git a/dist/lips.js b/dist/lips.js index 175dff7a..b3d33f96 100644 --- a/dist/lips.js +++ b/dist/lips.js @@ -31,7 +31,7 @@ * Copyright (c) 2014-present, Facebook, Inc. * released under MIT license * - * build: Fri, 06 Dec 2024 13:48:17 +0000 + * build: Fri, 06 Dec 2024 13:56:22 +0000 */ (function (global, factory) { @@ -4970,8 +4970,8 @@ }, cleanup); } }, { - key: "parse", - value: function parse(arg) { + key: "prepare", + value: function prepare(arg) { if (arg instanceof LString) { arg = arg.toString(); } @@ -5647,7 +5647,7 @@ parser = new Parser({ env: env }); - parser.parse(arg); + parser.prepare(arg); } case 2: _context9.next = 5; @@ -12360,7 +12360,7 @@ parser = new Parser({ env: env }); - parser.parse(line); + parser.prepare(line); case 6: return _context14.abrupt("return", _this10.__parser__); case 7: @@ -17397,10 +17397,10 @@ // ------------------------------------------------------------------------- var banner = function () { // Rollup tree-shaking is removing the variable if it's normal string because - // obviously 'Fri, 06 Dec 2024 13:48:17 +0000' == '{{' + 'DATE}}'; can be removed + // obviously 'Fri, 06 Dec 2024 13:56:22 +0000' == '{{' + 'DATE}}'; can be removed // but disabling Tree-shaking is adding lot of not used code so we use this // hack instead - var date = LString('Fri, 06 Dec 2024 13:48:17 +0000').valueOf(); + var date = LString('Fri, 06 Dec 2024 13:56:22 +0000').valueOf(); var _date = date === '{{' + 'DATE}}' ? new Date() : new Date(date); var _format = function _format(x) { return x.toString().padStart(2, '0'); @@ -17440,7 +17440,7 @@ read_only(Parameter, '__class__', 'parameter'); // ------------------------------------------------------------------------- var version = 'DEV'; - var date = 'Fri, 06 Dec 2024 13:48:17 +0000'; + var date = 'Fri, 06 Dec 2024 13:56:22 +0000'; // unwrap async generator into Promise var parse = compose(uniterate_async, _parse); diff --git a/src/lips.js b/src/lips.js index ce1302e0..1906c9f3 100644 --- a/src/lips.js +++ b/src/lips.js @@ -1521,7 +1521,7 @@ class Parser { return result; }, cleanup); } - parse(arg) { + prepare(arg) { if (arg instanceof LString) { arg = arg.toString(); } @@ -1867,7 +1867,7 @@ async function* _parse(arg, env) { parser = arg; } else { parser = new Parser({ env }); - parser.parse(arg); + parser.prepare(arg); } let prev; while (true) { @@ -7037,7 +7037,7 @@ function InputPort(read, env = global_env) { if (!this.char_ready()) { const line = await this._read(); parser = new Parser({ env }); - parser.parse(line); + parser.prepare(line); } return this.__parser__; }); @@ -7983,7 +7983,7 @@ const constants = { ...parsable_contants }; // ------------------------------------------------------------------------- -const global_env = new Environment({ +var global_env = new Environment({ eof, undefined, // undefined as parser constant breaks most of the unit tests // ---------------------------------------------------------------------