Commit Graph

90 Commits

Author SHA1 Message Date
hellerve
f76d664c43 compiler: make range a regular function instead of a template 2018-01-10 14:20:17 +01:00
hellerve
de40aef4d8 array templates: rewrite index-of and elem-count in carp 2018-01-02 14:39:24 +01:00
hellerve
b3dcd0311d compiler: simplified error handling in commands 2017-12-30 15:13:00 +01:00
hellerve
48d1858b28 compiler: made commands throw eval error 2017-12-30 15:13:00 +01:00
hellerve
2d183768fe compiler: added dynamic +, -, *, and / on integers 2017-12-30 15:13:00 +01:00
hellerve
85ce16d5db core & compiler: initial work on #108 2017-12-30 15:13:00 +01:00
Erik Svedäng
c25fb23a24 Whitespace. 2017-12-28 14:42:19 +01:00
NOP0
24e64993cd Fix for --core-flag 2017-12-24 14:26:43 +01:00
Erik Svedäng
4812605ec0 A 'c' command for printing the c-code of an expression. Moved dynamic functions to Dynamic module. 2017-12-23 06:30:42 +01:00
hellerve
b9368490d1 compiler: removed superfluous module from import list 2017-12-22 13:09:42 +01:00
hellerve
0ff8d77494 compiler: moved and, or, not macros back to eval, made them short-circuit 2017-12-22 13:04:34 +01:00
hellerve
1c861d9f4d interim commit 2017-12-22 11:17:19 +01:00
hellerve
b278622fa7 commands: moved arithmetic/logic functions from eval loop to Commands 2017-12-21 18:32:06 +01:00
Erik Svedäng
e20532ce9c A bunch of functions extracted from 'eval' to their own proper dynamic functions. 2017-12-18 06:54:28 +01:00
Erik Svedäng
025c47e898 Lookup during dynamic evaluation automatically searches the 'Dynamic' module. 2017-12-17 22:36:46 +01:00
Erik Svedäng
1f4ea153d2 Prepare for a Dynamic module that's part of the out-of-the-box environment. 2017-12-16 15:42:35 +01:00
Erik Svedäng
f8a0560dce 'list?' extracted 2017-12-15 16:53:03 +01:00
Erik Svedäng
26815686a8 Can set the compiler and make it echo its command. 2017-12-12 11:23:59 +01:00
Erik Svedäng
ad6b1a9b6d Added 'words' and 'lines' function 2017-12-03 22:30:48 +01:00
Erik Svedäng
c9b2ae9fc1 Don't emit unnecessary text when running compiler with -x or -b flags. 2017-12-01 15:19:39 +01:00
Erik Svedäng
9625afa194 The info and type commands are special forms now, to avoid having to
quote their args.
2017-12-01 10:49:46 +01:00
Erik Svedäng
5efecc1c8a Turned the def* commands into special forms to not evaluated their args. 2017-12-01 10:36:14 +01:00
Erik Svedäng
778b0d465e Args to commands are not evaluated at the REPL, for now. 2017-11-30 23:00:00 +01:00
Erik Svedäng
9e51b110af Added 'Dynamic' module that will contain dynamic versions of various functions. 2017-11-30 14:47:21 +01:00
Erik Svedäng
652a3d7f40 Defmodule command. 2017-11-30 14:40:30 +01:00
Erik Svedäng
824c4d6047 Deftype command. 2017-11-30 14:18:52 +01:00
Erik Svedäng
622ce550c3 Added defmacro and defdynamic as commands. 2017-11-30 14:04:44 +01:00
Erik Svedäng
4ab309783b Definterface command. 2017-11-30 13:56:46 +01:00
Erik Svedäng
1cbf55beb5 Register command. 2017-11-30 09:14:12 +01:00
Erik Svedäng
d9cd5d57b1 OS command. 2017-11-30 09:05:46 +01:00
Erik Svedäng
91f75a9943 Added 'project-set!' command. 2017-11-30 08:53:24 +01:00
Erik Svedäng
6e8ed75d44 Info command. 2017-11-30 08:44:28 +01:00
Erik Svedäng
ad872cb9a3 Type command. 2017-11-30 08:28:09 +01:00
Erik Svedäng
38af1045e0 Use command. 2017-11-30 08:22:18 +01:00
Erik Svedäng
7ea89e0369 Expand command. 2017-11-30 08:12:53 +01:00
Erik Svedäng
92419a4a76 Made 'macro-log' into a command. 2017-11-30 08:06:33 +01:00
Erik Svedäng
74b8dbb1b4 added "load" command 2017-11-29 23:26:00 +01:00
Erik Svedäng
314a56a858 Build command. Will only print result of dynamic function if it's non-nil. 2017-11-29 22:16:01 +01:00
Erik Svedäng
e777a32309 env, help and project commands 2017-11-29 16:54:38 +01:00
Erik Svedäng
c74c72c779 exe and reload command 2017-11-29 16:40:08 +01:00
Erik Svedäng
453e3df1d3 Cat command. 2017-11-29 16:18:36 +01:00
Erik Svedäng
22ecb7071d Quit command. 2017-11-29 16:10:37 +01:00
Erik Svedäng
1484cb77ec Simple example of a dynamic command: "destroy" 2017-11-28 22:57:53 +01:00
Erik Svedäng
028400dc52 More configurations. 2017-11-24 17:28:25 +01:00
Erik Svedäng
4b3af00e32 New interface: 'str'. Also made structs register with 'str' and 'copy' when created. 2017-11-23 22:35:14 +01:00
Erik Svedäng
85da1f3bd7 Calling info on an interface will give a bunch of useful information. 2017-11-22 23:50:33 +01:00
Erik Svedäng
f566d080d8 Interfaces more typeclass-like, all tests run. 2017-11-22 22:03:08 +01:00
Erik Svedäng
6f86e2802a New compiler flag: --log-memory 2017-11-22 16:33:03 +01:00
Erik Svedäng
d8f82429ee Errors caught at the REPL will exit the compiler when running it with -b or -x flags. 2017-11-22 14:26:47 +01:00
Erik Svedäng
d64552f1ec Tests will stop if there's an error. 2017-11-22 14:12:09 +01:00