fez-lisp 1.6.35 → 1.6.36

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/README.md CHANGED
@@ -17,15 +17,6 @@
17
17
 
18
18
  ## [Try it in online editor](https://at-290690.github.io/fez/)
19
19
 
20
- ```lisp
21
- ; Build-in keywords
22
- (/ ...) (+ ...) (* ...) (- ...) (= ...) (< ...) (> ...) (>= ...) (<= ...) (& ...) (~ ...) (| ...) (^ ...) (<< ...) (>> ...)
23
- (mod ...) (let ...) (if ...) (not ...) (and ...) (or ...) (atom? ...) (lambda? ...)
24
- (length ...) (do ...) (array ...) (set! ...) (pop! ...) (get ...) (lambda ...) (apply ...)
25
- ```
26
-
27
- ## ⚠️ Important: Do not use this programming language in production!
28
-
29
20
  ```lisp
30
21
  ; Lisp programming language. It's not exactly like other Lisps.
31
22
  ; This is a CUSTOM lisp language that does not fully follow the general Lisp conventions
@@ -53,6 +44,12 @@
53
44
  ;
54
45
  ; See below for more examples and details.
55
46
 
47
+
48
+ ; Build-in keywords
49
+ (/ ...) (+ ...) (* ...) (- ...) (= ...) (< ...) (> ...) (>= ...) (<= ...) (& ...) (~ ...) (| ...) (^ ...) (<< ...) (>> ...)
50
+ (mod ...) (let ...) (if ...) (not ...) (and ...) (or ...) (atom? ...) (lambda? ...)
51
+ (length ...) (do ...) (array ...) (set! ...) (pop! ...) (get ...) (lambda ...) (apply ...)
52
+
56
53
  ; Important Note:
57
54
  ; In this programming language, parentheses are used to group expressions and define the structure of code.
58
55
  ; It is essential to keep the number of opening and closing parentheses balanced.
@@ -215,6 +212,22 @@
215
212
  (boole:true? var) ; - Check if boolean variable is true
216
213
  (boole:false? var) ; - Check if boolean variable is false
217
214
  ;
215
+
216
+ ; =============================
217
+ ; Boolean Values: true and false
218
+ ; =============================
219
+ ; In this language, 'true' and 'false' are the canonical boolean values.
220
+ ; - 'true' is equivalent to 1 (logical true)
221
+ ; - 'false' is equivalent to 0 (logical false)
222
+ ; You can use 'true' and 'false' directly in conditions, logical operations, and as variable names for boolean logic.
223
+ ; All conditions and logical operations should use these (or 1/0) for clarity and correctness.
224
+ ;
225
+ ; Examples:
226
+ (and true false) ; returns false (0)
227
+ (or true false) ; returns true (1)
228
+ (not false) ; returns true (1)
229
+
230
+
218
231
  ; Examples:
219
232
  (let counter (math:var-def 0)) ; numeric variable
220
233
  (math:var-increment! counter) ; increment by 1
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.35",
5
+ "version": "1.6.36",
6
6
  "type": "module",
7
7
  "main": "index.js",
8
8
  "keywords": [
package/src/debugger.js CHANGED
@@ -16,7 +16,13 @@ import {
16
16
  SPECIAL_FORMS_SET
17
17
  } from './keywords.js'
18
18
  import { isLeaf, LISP } from './parser.js'
19
- import { definedTypes, filteredDefinedTypes, withCtxTypes } from './types.js'
19
+ import {
20
+ definedTypes,
21
+ filteredDefinedTypes,
22
+ formatType,
23
+ SPECIAL_FORM_TYPES,
24
+ withCtxTypes
25
+ } from './types.js'
20
26
  import {
21
27
  isForbiddenVariableName,
22
28
  removeNoCode,