From c6ce5c7f9f34b95504cb3286a677e106fa99c8e7 Mon Sep 17 00:00:00 2001 From: mryouse Date: Fri, 13 May 2022 04:44:15 +0000 Subject: progress and todo 5/12 --- README.md | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 2225e37..a3195c4 100644 --- a/README.md +++ b/README.md @@ -17,6 +17,7 @@ ### io - `(print [out :string]) => :bool ; print to stdout` + - `(print-all [strings :list]) => :bool ; a list of strings` ### math - `(+ [left :number] [right :number]) => :number` @@ -27,7 +28,7 @@ - `(concat [arg1 :string] [arg2 :string]) => :string` ### flow control - - `(if [cond :bool] [t-branch :any] [[f-branch :any]]) => :any` + - `(if [cond :bool] [t-branch :any|:expr] [[f-branch :any|:expr]]) => :any` ### type checking - `(string? [arg :any]) => :bool` @@ -36,11 +37,28 @@ - `(number? [arg :any]) => :bool ; returns #true for :int or :float` - `(bool? [arg :any]) => :bool` +### type conversion + - `(int->string [arg :int]) => :string` + - `(float->string [arg :float]) => :string` + - `(number->string [arg :number]) => :string` + - `(bool->string [arg :bool]) => :string` + - `(->string [arg :literal]) => :string ; works for all literals` + +### shell + - `($ [command :string]) => :list ; doesn't support pipes, first item is return code` + - `($| [commands :list]) => :bool ; pipes together multiple shell commands` + ### other - pretty much nothing else ## TODO (this section may be incomplete) +### types +- [ ] refine type system + +### parsing +- [ ] build an AST like a real person + ### math - [ ] division (float) - [ ] division (int) @@ -59,9 +77,9 @@ - [ ] pipe ### lists -- [?] lex -- [?] parse -- [?] evaluate +- [x] lex +- [x] parse +- [x] evaluate ### other structure things - [ ] generic struct? @@ -72,5 +90,5 @@ - [ ] access ### shell -- [ ] call out -- [ ] pipe +- [x] call out +- [x] pipe -- cgit v1.2.3