26463a4c00
Separated mutually recursive definition of desugar phases
...
They do not need to be mutually recursive at all. At first I thought
they would have to be, because I thought it would be best if each phase
completely desugared the bodies of the expressions they handle, but now
I see that would probably lead to an infinite loop.
There is simply no reason to couple them so tightly.
2025-12-27 16:44:18 +03:00
cd8337b650
Added gensym, and phases in the desugar module for logical and & or
2025-12-27 16:41:22 +03:00
be85a9a6ed
Added desugar steps to add (begin) wrappers around long lambda bodies, and rewrite internal (define) forms into letrec forms
2025-12-26 22:13:30 +03:00
d84d81e824
Started work on the compiler, with a desugar phase
2025-12-26 20:42:03 +03:00
fb47e6ecdd
Complete reorganization: finally at a building state again
2025-12-08 22:25:58 +03:00
4faf309752
Reorganized project
2025-12-08 22:25:36 +03:00
3f0a860a03
Reorganized basically everything, making way for the compiler
2025-11-15 13:06:16 +03:00
27115ab4f2
Added pretty-printing.
2025-11-12 23:32:54 +03:00
32b735d89f
Improved the debug print function to pretty-print lists.
2025-11-11 23:23:16 +03:00
53d0af4dae
Making preparations for more of the standard library
2025-11-11 22:34:22 +03:00
c9f02a7cda
Revert "Minor changes"
...
This reverts commit 6243ace80b .
2025-11-06 23:29:38 +03:00
6243ace80b
Minor changes
2025-11-06 23:29:28 +03:00
7544e8753c
Added more math operations, generalized and simplified existing math operations, added some list operations for the lisp lists
2025-11-06 23:02:16 +03:00
c69962959f
Reorganized the standard library a little more, moved the initialization code for the standard environment into a function. Making way for more organization changes to come
2025-11-05 23:55:21 +03:00
5a90f78219
Added type annotations for the environment module to make things clearer, switched bind_args implementation with a simpler one.
2025-11-03 23:00:46 +03:00
4d440dc1d7
remove mistaken autosave file
2025-11-03 22:33:15 +03:00
d24f8dc77f
Reorganized environment-related functions.
2025-11-03 22:32:43 +03:00
37c8d2a62a
Added some standard functions
2025-10-30 23:42:10 +03:00
45828a8dd4
reorganized a bit, separated bind-symbol into two operators that have different uses, def and set
2025-10-30 21:01:40 +03:00
Emin Arslan
ccf1aec5da
Removed irrelevant comment
2025-10-16 22:31:12 +03:00
Emin Arslan
6c3efde5e9
Changed the addition and subtraction functions to be clearer
2025-10-16 22:28:11 +03:00
Emin Arslan
8273baecf1
Added def, changed naming, and added if expressions
2025-10-16 17:15:04 +03:00
Emin Arslan
fb52fb03b6
Evaluation is now performed properly, mimicking Common Lisp, and basic defun and defmacro definitions are provided (automatically executed on startup)
2025-10-14 22:26:00 +03:00
Emin Arslan
7105b2dd39
Added dot syntax for lists, and proper quote syntax. LQuoted is now unused
2025-10-14 22:24:57 +03:00
Emin Arslan
b0ded579af
Added builtin special forms, lambda forms and bind-symbol. got rid of bind-function, as it is now unnecessary. it is now possible to create functions!
2025-10-14 21:05:10 +03:00
Emin Arslan
22e7c3dbb3
Re-organized a lot of code, changed functions so that functions capture the surrounding environment and execute in that environment
2025-10-14 20:21:29 +03:00
Emin Arslan
965804c18d
General style changes, nothing major
2025-10-14 19:01:29 +03:00
Emin Arslan
a905ab2b42
Added bind-function primitive that allows us to define functions, also changed evaluation to allow for a persistent environment
2025-10-12 21:58:54 +03:00
Emin Arslan
aa066f87d0
Initial state - basic lexer + parser + interpreter
2025-10-12 21:33:57 +03:00