Commit Graph

23 Commits

Author SHA1 Message Date
haxala1r facd6bb469 Improved the debug print function to pretty-print lists. 2025-12-28 21:39:38 +03:00
haxala1r aea0fe510f Making preparations for more of the standard library 2025-12-28 21:39:38 +03:00
haxala1r f342289cb3 Revert "Minor changes"
This reverts commit 6243ace80b.
2025-12-28 21:39:38 +03:00
haxala1r 3c454b1fe3 Minor changes 2025-12-28 21:39:37 +03:00
haxala1r 6b54db3fa6 Added more math operations, generalized and simplified existing math operations, added some list operations for the lisp lists 2025-12-28 21:39:37 +03:00
haxala1r 724aeefc0f 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-12-28 21:39:37 +03:00
haxala1r bafa9bdfbe Added type annotations for the environment module to make things clearer, switched bind_args implementation with a simpler one. 2025-12-28 21:39:37 +03:00
haxala1r 44842aaead Update gitignore 2025-12-28 21:39:37 +03:00
haxala1r bd4ee5fddd remove mistaken autosave file 2025-12-28 21:39:37 +03:00
haxala1r eb3b311589 Reorganized environment-related functions. 2025-12-28 21:39:37 +03:00
haxala1r 3d4e70b6a1 Added some standard functions 2025-12-28 21:39:37 +03:00
haxala1r 1df6f3603c reorganized a bit, separated bind-symbol into two operators that have different uses, def and set 2025-12-28 21:39:37 +03:00
Emin Arslan 6a9c2b8ddc Removed irrelevant comment 2025-12-28 21:39:37 +03:00
Emin Arslan e372691b16 Changed the addition and subtraction functions to be clearer 2025-12-28 21:39:37 +03:00
Emin Arslan 471fac4906 Added def, changed naming, and added if expressions 2025-12-28 21:39:37 +03:00
Emin Arslan 17fd8f2d83 Evaluation is now performed properly, mimicking Common Lisp, and basic defun and defmacro definitions are provided (automatically executed on startup) 2025-12-28 21:39:37 +03:00
Emin Arslan 7ea1bcdb5a Added dot syntax for lists, and proper quote syntax. LQuoted is now unused 2025-12-28 21:39:37 +03:00
Emin Arslan 8f46107e1e Improved the repl to return to evaluation upon error. Also added an exit command 2025-12-28 21:39:37 +03:00
Emin Arslan 9097ddd5c1 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-12-28 21:39:37 +03:00
Emin Arslan 55bf17cf47 Re-organized a lot of code, changed functions so that functions capture the surrounding environment and execute in that environment 2025-12-28 21:39:37 +03:00
Emin Arslan 4a1d27b01e General style changes, nothing major 2025-12-28 21:39:37 +03:00
Emin Arslan 2e4a0f6f83 Added bind-function primitive that allows us to define functions, also changed evaluation to allow for a persistent environment 2025-12-28 21:39:37 +03:00
Emin Arslan af860266a9 Initial state - basic lexer + parser + interpreter 2025-12-28 21:39:37 +03:00