@forthic/interp 0.9.0 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../../src/forthic/utils.ts"],"names":[],"mappings":";;AAAA,8BAEG;AAED,8BAGC;AAED,8BAEC;AAED,4BAEC;AAED,0CAKC;AAED,oCAEC;AAED,8BAEC;AAED,sCAQC;AAED,0BAWC;AAED,wCAcC;AAED,kCAKC;AA5EH,SAAgB,SAAS,CAAC,KAAU;IAChC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,YAAY,MAAM,CAAC;AAC9D,CAAC;AAED,SAAgB,SAAS,CAAC,KAAU;IAClC,IAAI,KAAK,KAAK,IAAI;QAAE,OAAO,KAAK,CAAC;IACjC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC5D,CAAC;AAED,SAAgB,SAAS,CAAC,KAAU;IAClC,OAAO,SAAS,CAAC,KAAK,CAAC,CAAC;AAC1B,CAAC;AAED,SAAgB,QAAQ,CAAC,KAAU;IACjC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC3D,CAAC;AAED,SAAgB,eAAe,CAAC,KAAU;IACxC,IAAI,SAAS,CAAC,KAAK,CAAC,EAAE,CAAC;QACrB,OAAO,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,MAAM,IAAI,CAAC,CAAC;IACxC,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED,SAAgB,YAAY,CAAC,KAAU;IACrC,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC;AAC7C,CAAC;AAED,SAAgB,SAAS,CAAC,GAAQ;IAChC,OAAO,YAAY,CAAC,GAAG,C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AM,GAAG,EAAE,CAAC;IAChB,IAAI,IAAI,YAAY,4BAAQ,CAAC,SAAS,EAAE,CAAC;QACvC,MAAM,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC;QACrB,MAAM,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC;QACnB,MAAM,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC;QAEpB,IAAI,KAAK,GAAG,GAAG,CAAC,EAAE,CAAC;QACnB,IAAI,KAAK,GAAG,GAAG,CAAC,EAAE,CAAC;QACnB,IAAI,CAAC,GAAG,EAAE;YAAE,KAAK,GAAG,IAAI,CAAC,EAAE,CAAC;QAC5B,IAAI,CAAC,GAAG,EAAE;YAAE,KAAK,GAAG,IAAI,CAAC,EAAE,CAAC;QAC5B,MAAM,GAAG,GAAG,CAAC,IAAI,KAAK,IAAI,KAAK,EAAE,CAAC;IACpC,CAAC;IACD,OAAO,MAAM,CAAC;AAChB,CAAC;AAED,SAAgB,WAAW,CAAC,IAAwB;IAClD,MAAM,GAAG,GAAG,cAAc,CAAC,IAAI,CAAC,CAAC;IACjC,MAAM,MAAM,GAAG,GAAG,CAAC,UAAU,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;IACvC,MAAM,MAAM,GAAG,QAAQ,CAAC,MAAM,CAAC,CAAC;IAChC,OAAO,MAAM,CAAC;AAChB,CAAC"}
@@ -1,4 +1,5 @@
1
1
  import { Module, Word } from "./module";
2
+ import { Temporal } from "temporal-polyfill";
2
3
  import { type Interpreter } from "./interpreter";
3
4
  export declare class GlobalModule extends Module {
4
5
  literal_handlers: Array<(value: any) => any>;
@@ -9,8 +10,8 @@ export declare class GlobalModule extends Module {
9
10
  to_bool(str_val: string): boolean | null;
10
11
  to_int(str_val: string): number | null;
11
12
  to_float(str_val: string): number | null;
12
- to_literal_date(str_val: string): Date | null;
13
- to_time(str_val: string): Date | null;
13
+ to_literal_date(str_val: string): Temporal.PlainDate | null;
14
+ to_time(str_val: string): Temporal.PlainTime | null;
14
15
  make_element_word(element_name: string): (interp: Interpreter) => Promise<void>;
15
16
  add_element_word(element_name: string): void;
16
17
  word_VARIABLES(interp: Interpreter): void;
@@ -94,7 +95,7 @@ export declare class GlobalModule extends Module {
94
95
  word_FRIDAY(interp: Interpreter): void;
95
96
  word_SATURDAY(interp: Interpreter): void;
96
97
  word_SUNDAY(interp: Interpreter): void;
97
- static get_day_this_week(day_of_week: any): Date;
98
+ static get_day_this_week(day_of_week: number, timezone: Temporal.TimeZoneLike): Temporal.PlainDate;
98
99
  word_ADD_DAYS(interp: Interpreter): void;
99
100
  word_SUBTRACT_DATES(interp: Interpreter): void;
100
101
  word_DATE_to_STR(interp: Interpreter): void;
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.GlobalModule = void 0;
4
4
  const module_1 = require("./module");
5
5
  const utils_1 = require("./utils");
6
+ const temporal_polyfill_1 = require("temporal-polyfill");
6
7
  const map_word_1 = require("./global_module/map_word");
7
8
  const tokenizer_1 = require("./tokenizer");
8
9
  const errors_1 = require("./errors");
@@ -261,9 +262,11 @@ class GlobalModule extends module_1.Module {
261
262
  const year = Number(match[1]);
262
263
  const month = Number(match[2]);
263
264
  const day = Number(match[3]);
264
- const result = new Date();
265
- result.setUTCFullYear(year, month - 1, day);
266
- result.setUTCHours(0, 0, 0, 0);
265
+ const result = temporal_polyfill_1.Temporal.PlainDate.from({
266
+ year,
267
+ month,
268
+ day,
269
+ });
267
270
  return result;
268
271
  }
269
272
  to_time(str_val) {
@@ -276,8 +279,10 @@ class GlobalModule extends module_1.Module {
276
279
  return null;
277
280
  if (minutes >= 60)
278
281
  return null;
279
- const result = new Date();
280
- result.setHours(hours, minutes, 0, 0);
282
+ const result = temporal_polyfill_1.Temporal.PlainTime.from({
283
+ hour: hours,
284
+ minute: minutes,
285
+ });
281
286
  return result;
282
287
  }
283
288
  // Convenience function to create element word handlers
@@ -1581,45 +1586,54 @@ class GlobalModule extends module_1.Module {
1581
1586
  // ( time -- time )
1582
1587
  word_AM(interp) {
1583
1588
  const time = interp.stack_pop();
1584
- if (!(time instanceof Date))
1589
+ if (!(time instanceof temporal_polyfill_1.Temporal.PlainTime))
1585
1590
  throw "AM expecting a time";
1586
1591
  let result = time;
1587
- if (time.getHours() >= 12) {
1588
- result = new Date();
1589
- result.setHours(time.getHours() - 12);
1590
- result.setMinutes(time.getMinutes());
1592
+ if (time.hour >= 12) {
1593
+ result = temporal_polyfill_1.Temporal.PlainTime.from({
1594
+ hour: time.hour - 12,
1595
+ minute: time.minute,
1596
+ });
1591
1597
  }
1592
1598
  interp.stack_push(result);
1593
1599
  }
1594
1600
  // ( time -- time )
1595
1601
  word_PM(interp) {
1596
1602
  const time = interp.stack_pop();
1597
- if (!(time instanceof Date))
1603
+ if (!(time instanceof temporal_polyfill_1.Temporal.PlainTime))
1598
1604
  throw "PM expecting a time";
1599
1605
  let result = time;
1600
- if (time.getHours() < 12) {
1601
- result = new Date();
1602
- result.setHours(time.getHours() + 12);
1603
- result.setMinutes(time.getMinutes());
1606
+ if (time.hour < 12) {
1607
+ result = temporal_polyfill_1.Temporal.PlainTime.from({
1608
+ hour: time.hour + 12,
1609
+ minute: time.minute,
1610
+ });
1604
1611
  }
1605
1612
  interp.stack_push(result);
1606
1613
  }
1607
1614
  // ( -- time )
1608
1615
  word_NOW(interp) {
1609
- const result = new Date();
1616
+ const result = temporal_polyfill_1.Temporal.Now.plainDateTimeISO(interp.get_timezone());
1610
1617
  interp.stack_push(result);
1611
1618
  }
1612
1619
  // ( item -- time )
1613
1620
  word_to_TIME(interp) {
1614
1621
  const item = interp.stack_pop();
1615
1622
  let result;
1616
- if (item instanceof Date) {
1623
+ if (item instanceof temporal_polyfill_1.Temporal.PlainTime) {
1617
1624
  result = item;
1618
1625
  }
1626
+ else if (item instanceof temporal_polyfill_1.Temporal.PlainDateTime) {
1627
+ result = temporal_polyfill_1.Temporal.PlainTime.from(item);
1628
+ }
1619
1629
  else {
1620
1630
  // NB: We need a date in order for Date.parse to succeed. Also assuming str is a time
1621
1631
  const date_string = "Jan 1, 2000 " + item;
1622
- result = new Date(Date.parse(date_string));
1632
+ const date = new Date(Date.parse(date_string));
1633
+ result = temporal_polyfill_1.Temporal.PlainTime.from({
1634
+ hour: date.getHours(),
1635
+ minute: date.getMinutes(),
1636
+ });
1623
1637
  }
1624
1638
  interp.stack_push(result);
1625
1639
  }
@@ -1637,64 +1651,57 @@ class GlobalModule extends module_1.Module {
1637
1651
  }
1638
1652
  // ( -- date )
1639
1653
  word_TODAY(interp) {
1640
- const result = new Date();
1641
- result.setHours(0, 0, 0, 0);
1654
+ const result = temporal_polyfill_1.Temporal.Now.plainDateISO(interp.get_timezone());
1642
1655
  interp.stack_push(result);
1643
1656
  }
1644
1657
  // ( -- date )
1645
1658
  word_MONDAY(interp) {
1646
- interp.stack_push(GlobalModule.get_day_this_week(0));
1659
+ interp.stack_push(GlobalModule.get_day_this_week(0, interp.get_timezone()));
1647
1660
  }
1648
1661
  // ( -- date )
1649
1662
  word_TUESDAY(interp) {
1650
- interp.stack_push(GlobalModule.get_day_this_week(1));
1663
+ interp.stack_push(GlobalModule.get_day_this_week(1, interp.get_timezone()));
1651
1664
  }
1652
1665
  // ( -- date )
1653
1666
  word_WEDNESDAY(interp) {
1654
- interp.stack_push(GlobalModule.get_day_this_week(2));
1667
+ interp.stack_push(GlobalModule.get_day_this_week(2, interp.get_timezone()));
1655
1668
  }
1656
1669
  // ( -- date )
1657
1670
  word_THURSDAY(interp) {
1658
- interp.stack_push(GlobalModule.get_day_this_week(3));
1671
+ interp.stack_push(GlobalModule.get_day_this_week(3, interp.get_timezone()));
1659
1672
  }
1660
1673
  // ( -- date )
1661
1674
  word_FRIDAY(interp) {
1662
- interp.stack_push(GlobalModule.get_day_this_week(4));
1675
+ interp.stack_push(GlobalModule.get_day_this_week(4, interp.get_timezone()));
1663
1676
  }
1664
1677
  // ( -- date )
1665
1678
  word_SATURDAY(interp) {
1666
- interp.stack_push(GlobalModule.get_day_this_week(5));
1679
+ interp.stack_push(GlobalModule.get_day_this_week(5, interp.get_timezone()));
1667
1680
  }
1668
1681
  // ( -- date )
1669
1682
  word_SUNDAY(interp) {
1670
- interp.stack_push(GlobalModule.get_day_this_week(6));
1671
- }
1672
- static get_day_this_week(day_of_week) {
1673
- // NOTE: Monday is start of week
1674
- function normalize_day(day) {
1675
- return day;
1676
- }
1677
- const today = new Date();
1678
- today.setHours(0, 0, 0, 0);
1679
- const delta_days = (day_of_week - normalize_day(today.getDay())) % 7;
1680
- const result = today;
1681
- result.setDate(result.getDate() + delta_days + 1);
1683
+ interp.stack_push(GlobalModule.get_day_this_week(6, interp.get_timezone()));
1684
+ }
1685
+ static get_day_this_week(day_of_week, timezone) {
1686
+ // Get plain date for day of week
1687
+ const today = temporal_polyfill_1.Temporal.Now.plainDateISO(timezone);
1688
+ const delta_days = (day_of_week - today.dayOfWeek) % 7;
1689
+ const result = today.add({ days: delta_days });
1682
1690
  return result;
1683
1691
  }
1684
1692
  // ( date num-days -- date )
1685
1693
  word_ADD_DAYS(interp) {
1686
1694
  const num_days = interp.stack_pop();
1687
1695
  const date = interp.stack_pop();
1688
- const result = new Date(date);
1689
- result.setDate(result.getDate() + num_days);
1696
+ const result = temporal_polyfill_1.Temporal.PlainDate.from(date).add({ days: num_days });
1690
1697
  interp.stack_push(result);
1691
1698
  }
1692
1699
  // ( l_date r_date -- num_days )
1693
1700
  word_SUBTRACT_DATES(interp) {
1694
- const r_date = interp.stack_pop();
1695
- const l_date = interp.stack_pop();
1696
- const ms_per_day = 1000 * 60 * 60 * 24;
1697
- const result = Math.round((l_date.getTime() - r_date.getTime()) / ms_per_day);
1701
+ const r_date = temporal_polyfill_1.Temporal.PlainDate.from(interp.stack_pop());
1702
+ const l_date = temporal_polyfill_1.Temporal.PlainDate.from(interp.stack_pop());
1703
+ // Subtract the dates and get the difference in days
1704
+ const result = r_date.until(l_date).total({ unit: "days" });
1698
1705
  interp.stack_push(result);
1699
1706
  }
1700
1707
  // ( date -- str )
@@ -1712,28 +1719,36 @@ class GlobalModule extends module_1.Module {
1712
1719
  }
1713
1720
  // ( date time -- datetime )
1714
1721
  word_DATE_TIME_to_DATETIME(interp) {
1715
- const time = interp.stack_pop();
1716
- const date = interp.stack_pop();
1717
- const dt_string = `${date.getFullYear()}-${date.getMonth() + 1}-${date.getDate()} ${time.getHours()}:${time.getMinutes()}`;
1718
- const result = new Date(dt_string);
1722
+ const time = temporal_polyfill_1.Temporal.PlainTime.from(interp.stack_pop());
1723
+ const date = temporal_polyfill_1.Temporal.PlainDate.from(interp.stack_pop());
1724
+ const result = temporal_polyfill_1.Temporal.PlainDateTime.from({
1725
+ year: date.year,
1726
+ month: date.month,
1727
+ day: date.day,
1728
+ hour: time.hour,
1729
+ minute: time.minute,
1730
+ });
1719
1731
  interp.stack_push(result);
1720
1732
  }
1721
1733
  // ( datetime -- timestamp )
1722
1734
  word_DATETIME_to_TIMESTAMP(interp) {
1723
1735
  const datetime = interp.stack_pop();
1724
- const result = Math.round(datetime.getTime() / 1000);
1736
+ // Convert to ZonedDateTime
1737
+ const zonedDateTime = datetime.toZonedDateTime(interp.get_timezone());
1738
+ const result = zonedDateTime.toInstant().epochSeconds;
1725
1739
  interp.stack_push(result);
1726
1740
  }
1727
1741
  // ( timestamp -- datetime )
1728
1742
  word_TIMESTAMP_to_DATETIME(interp) {
1729
1743
  const timestamp = interp.stack_pop();
1730
- const result = new Date(timestamp * 1000);
1744
+ const result = temporal_polyfill_1.Temporal.Instant.fromEpochSeconds(timestamp).toZonedDateTime({ timeZone: interp.get_timezone(), calendar: "iso8601" });
1731
1745
  interp.stack_push(result);
1732
1746
  }
1733
1747
  // ( str -- datetime )
1734
1748
  word_STR_to_DATETIME(interp) {
1735
1749
  const s = interp.stack_pop();
1736
- const result = new Date(s);
1750
+ const date = new Date(s);
1751
+ const result = temporal_polyfill_1.Temporal.Instant.fromEpochMilliseconds(date.getTime()).toZonedDateTime({ timeZone: interp.get_timezone(), calendar: "iso8601" });
1737
1752
  interp.stack_push(result);
1738
1753
  }
1739
1754
  // ( str -- timestamp )