fez-lisp 1.6.54 → 1.6.56

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.
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "fez-lisp",
3
3
  "description": "Lisp interpreted & compiled to JavaScript",
4
4
  "author": "AT290690",
5
- "version": "1.6.54",
5
+ "version": "1.6.56",
6
6
  "type": "module",
7
7
  "main": "index.js",
8
8
  "keywords": [
package/src/check.js CHANGED
@@ -46,7 +46,8 @@ import {
46
46
  NUMBER,
47
47
  NUMBER_SUBTYPE,
48
48
  UNKNOWN_SUBTYPE,
49
- SubType
49
+ SubType,
50
+ GET_ARRAY_INFERENCE
50
51
  } from './types.js'
51
52
  import {
52
53
  Brr,
@@ -711,7 +712,7 @@ const resolveSetter = (first, rest, env, stack) => {
711
712
  break
712
713
  case APPLY:
713
714
  if (env[right[VALUE]]) {
714
- if (right[VALUE] === 'array:get') {
715
+ if (right[VALUE] === KEYWORDS.CREATE_ARRAY) {
715
716
  current[STATS][TYPE_PROP][1] = initArrayType({
716
717
  rem: rest.at(-1),
717
718
  env
@@ -848,25 +849,8 @@ const resolveReturnType = ({
848
849
  break
849
850
  default:
850
851
  {
851
- if (returns[VALUE] === KEYWORDS.GET_ARRAY)
852
+ if (returns[VALUE] === GET_ARRAY_INFERENCE)
852
853
  resolveGetter({ rem, prop, name, env })
853
- // if (
854
- // !GETTERS_SET.has(name) &&
855
- // GETTERS_SET.has(returns[VALUE]) &&
856
- // !resolveGetter({ rem, prop, name, env })
857
- // )
858
- // return retry(env[name][STATS], [returns, env], stack, () => {
859
- // resolveReturnType({
860
- // returns,
861
- // rem,
862
- // stack,
863
- // prop,
864
- // exp,
865
- // name,
866
- // env,
867
- // check
868
- // })
869
- // })
870
854
  checkPredicateNameDeep(name, exp, exp.slice(1), returns)
871
855
  // TODO: DRY
872
856
  const index = env[name][STATS][ARGUMENTS]
@@ -1535,14 +1519,6 @@ export const typeCheck = (
1535
1519
  // Setters are just like DEFINE_VARIABLE as they are essentially the Var case for Collections
1536
1520
  // So they MUST happen before Judgement
1537
1521
  resolveSetter(first, rest, env, stack)
1538
- if (first[VALUE] === 'array:get-infer' && first[TYPE] === APPLY) {
1539
- resolveGetter({
1540
- rem: rest[0],
1541
- prop: TYPE_PROP,
1542
- name: rest[0],
1543
- env
1544
- })
1545
- }
1546
1522
  // end of Var ---------------
1547
1523
  // Judgement
1548
1524
  const judge = () => {
package/src/types.js CHANGED
@@ -36,6 +36,7 @@ export const IS_ARGUMENT = 'is_arg'
36
36
  export const NIL = 'nil'
37
37
  export const TRUE_WORD = 'true'
38
38
  export const FALSE_WORD = 'false'
39
+ export const GET_ARRAY_INFERENCE = 'array:get'
39
40
  export class SubType {
40
41
  constructor(args) {
41
42
  this.types = []