Commit Graph

99 Commits

Author SHA1 Message Date
madmaurice d5f4e2b6bb Add implict tagbody to dolist 2021-04-10 22:38:54 +02:00
madmaurice e2df0bcefe Add implicit tagbody to dolist 2021-04-10 22:36:18 +02:00
madmaurice 97d472bf6a equal: nil equals nil 2021-04-10 22:35:50 +02:00
madmaurice 19de2ff4e8 Add implicit tagbody to the do macro 2021-04-10 22:14:02 +02:00
madmaurice e6342eda24 Implement tagbody and go macros 2021-04-10 21:42:44 +02:00
madmaurice 44468958b6 Implement dolist and add tests 2021-04-10 02:19:09 +02:00
madmaurice c5e9cf2155 Fix lexer: Strings can be empty 2021-04-10 01:26:07 +02:00
madmaurice ac1f8aef03 Implement dotimes and add tests 2021-04-10 01:16:03 +02:00
madmaurice 70ce321517 Add test for apply function 2021-04-10 01:02:33 +02:00
madmaurice f576081d22 Implement apply and rudimentary read-line 2021-04-10 00:17:54 +02:00
madmaurice ba0915f384 Add plan to each test 2021-04-09 00:01:27 +02:00
madmaurice 0cbc43927d Add tests for 'or' 2021-04-08 23:52:03 +02:00
madmaurice c79b2aabf4 Fix 'and': return nil if it has no operands 2021-04-08 23:49:04 +02:00
madmaurice 6bff33af20 Fix parsing comment at end of file 2021-04-08 23:33:09 +02:00
madmaurice 4aaff13d91 Add debug mode for lexer 2021-04-08 23:32:53 +02:00
madmaurice cf9f90c19b Fix cond.t
cond.t was not actually using equal but cond works anyway.
2021-04-08 22:10:58 +02:00
madmaurice 46d904535a Add implicit block to do macro 2021-04-08 21:53:21 +02:00
madmaurice e6cb6bd047 Add test for throw and catch 2021-04-08 21:49:00 +02:00
madmaurice 34d4de92f0 Implement macros catch and throw 2021-04-08 21:48:42 +02:00
madmaurice f50550f882 Catch rogue returns in top-level 2021-04-08 21:47:57 +02:00
madmaurice 8bdc8232f9 Add loop macro and a test 2021-04-07 23:31:28 +02:00
madmaurice 2e784310fb Add test for blocks 2021-04-07 23:17:08 +02:00
madmaurice a355528492 Implement block mechanism and macros block, return and return-from 2021-04-07 23:16:44 +02:00
madmaurice fe23edcb90 Add tests for two more edge cases 2021-04-06 23:54:22 +02:00
madmaurice 7d6a988e88 let.t - Remove debug comments 2021-04-06 23:50:56 +02:00
madmaurice 732a3f87b4 Add tests for when and unless testing for implicit progn 2021-04-06 23:40:10 +02:00
madmaurice b930ed8eba Fix macros when and unless
Both support implicit progn, not just one expression.
2021-04-06 23:36:06 +02:00
madmaurice 5c37830ef4 Replace two checks with slurp_token 2021-04-06 23:34:16 +02:00
madmaurice 9cc16ed55a Add parser function to parse multiple expressions 2021-04-06 23:30:21 +02:00
madmaurice 42b5567c29 Utilize peek_token where possible 2021-04-06 23:17:38 +02:00
madmaurice f86caf6b5f Add example fizzbuzz 2021-04-06 23:00:00 +02:00
madmaurice 8e6929c0a9 Add euler examples as tests 2021-04-06 22:41:49 +02:00
madmaurice cae6fef76d Add second euler problem as example 2021-04-06 22:21:26 +02:00
madmaurice cd769b36de Remove non standard range function
Let example define its own range function using do.
2021-04-06 22:11:52 +02:00
madmaurice 7ca4bad9b0 Implement do macro 2021-04-06 22:11:37 +02:00
madmaurice 1ff74f4f6c Fix grammar 2021-04-06 22:10:55 +02:00
madmaurice b14ed6d9d1 Add slurp_token for easier parsing 2021-04-06 21:11:13 +02:00
madmaurice c954f0216f when, unless: check for wrongful evaluation
when and unless must not evaluate their bodies if the condition does not require it.
2021-04-05 04:07:22 +02:00
madmaurice 9c0db610bf Add range function and euler1 example 2021-04-05 04:04:23 +02:00
madmaurice d07c480390 Set +x for run.pl 2021-04-05 04:03:47 +02:00
madmaurice b4e46a9b40 Add tests for mod function 2021-04-05 03:53:44 +02:00
madmaurice 941bd17ac6 Add mod function 2021-04-05 03:50:48 +02:00
madmaurice 41984b0083 Float support 2021-04-05 03:50:33 +02:00
madmaurice 9d2665e2e8 Fix grammar 2021-04-05 03:18:53 +02:00
madmaurice 03dfa8f188 Implement let* 2021-04-05 03:06:44 +02:00
madmaurice f1e7da781b Add comment function for tests 2021-04-05 00:25:53 +02:00
madmaurice 7f1283eecc Improve bool system
lisp has true in form of t and false in form of nil
2021-04-05 00:06:49 +02:00
madmaurice 61df548e00 Implement set 2021-04-04 23:13:17 +02:00
madmaurice 0ec88feeb6 Simplify parsing of identifiers 2021-04-04 22:55:26 +02:00
madmaurice 02ac5dd3fc Fix run.pl 2021-04-04 22:15:13 +02:00