1
1
mirror of https://github.com/kanaka/mal.git synced 2024-09-21 10:37:58 +03:00
Commit Graph

13 Commits

Author SHA1 Message Date
Joel Martin
c4269f9bf5 Convert to loccount based stats calculation. 2019-03-20 23:34:21 -05:00
Ben Dudson
20e02704c4 Add clean target
Deletes executables and object files
2018-01-03 15:43:22 +00:00
Ben Dudson
c4152b5fc2 Add stats and stats-lisp targets
Updated list of source files, added targets
with `;` as the comment character
2018-01-02 23:48:51 +00:00
Ben Dudson
331ddfed79 Adding README.md file and Make all target
* README.md in nasm/ directory lists some features and limitations

* Added NASM entry to root directory README.md

* Added an 'all' target to the nasm Makefile
2017-12-27 23:33:03 +00:00
Ben Dudson
a4e26fd0e6 Add try*/catch*
20 failing tests for step 9. Mainly assoc not yet implemented
2017-12-09 16:14:12 +00:00
Ben Dudson
5fc8a017d9 Add quote special form
Just returns its argument unmodified, but some
differences in handling values and pointers needed.

Added generic Makefile rule, builds step7_quote
2017-11-18 23:12:38 +00:00
Ben Dudson
1b30ad76a8 Adding support for atoms
* Functions atom, atom?, deref, reset!

* Printer support for atoms

* Type maltype_atom
2017-11-12 23:46:18 +00:00
Ben Dudson
2edb2d3cf2 Step 5: Tail call optimisation
Not working yet, still get memory-related errors
2017-11-11 01:04:11 +00:00
Ben Dudson
d692bd1f95 Added numeric comparison operators
TEST RESULTS (for ../tests/step4_if_fn_do.mal):
    0: soft failing tests
   60: failing tests
  108: passing tests
  168: total tests

Some to look at next time:

*  (= "" "")  -> false, should be true

*  (def! DO (fn* (a) 7))
   (DO 3) -> (7), should be 7

* Function with empty argument list currently not allowed
2017-11-06 23:37:57 +00:00
Ben Dudson
72893cd1e4 Stage 3 : def! working
Environment still hard-wired to be REPL env.

Added special variable *env* which returns the environment
object for printing. Helps debugging of environments.
2017-10-30 23:45:55 +00:00
Ben Dudson
c1cd93d097 Added arithmetic functions to core.asm
Starting step 2.

* core_add, core_sub, core_mul and core_div are defined
  in core.asm. These take a list of integers and return an integer.

Currently step2_eval.asm is hard-wired to call core_add,
so (1 2 3) -> 6
2017-10-22 15:09:13 +01:00
Ben Dudson
955b354b00 Handles symbols, quoting and unquoting
Test suite passes required and deferrable tests except:

1. () is apparently different from nil, so empty list needs to be
   handled differently

2. String printing currently just prints the string without
   quotes or escapes.
2017-10-21 08:21:56 +01:00
Ben Dudson
0ad505e829 Step0 (input/output) passes tests
* String handling simplified, will not handle very long strings
* Memory allocation missing, always using the same buffer currently
2017-10-09 00:10:03 +01:00