Commit graph

295 commits

Author SHA1 Message Date
Erin 6889c3f3b2 Fmt! 2021-12-07 21:20:16 +01:00
Erin 65bb29d401 Function negation 2021-12-07 21:18:45 +01:00
Erin 3a59501217 Revert "Merge branch 'fix/unused-code'"
This reverts commit 6ee12a7c91, reversing
changes made to 706d39e860.
2021-12-07 20:54:23 +01:00
Alex Bethel 6ee12a7c91 Merge branch 'fix/unused-code' 2021-11-27 17:20:54 -06:00
Alex Bethel 2f31e7c3d5 Fix unused code warnings 2021-11-27 11:15:29 -06:00
Alex Bethel 6cd2b8bd44 Avoid trailing comma in cart printout 2021-11-27 11:11:03 -06:00
Alex Bethel 711b8e1c03 Slightly better ExecEnv::assign
A little more idiomatic, avoid some borrow checker clumsiness, add
comments.
2021-11-27 11:02:41 -06:00
Alex Bethel 9727a9b577 Assign read syntax 2021-11-05 17:09:53 -06:00
Alex Bethel 6849f7f296 Coerce indexing assignments into non-carts 2021-11-05 16:18:07 -06:00
Erin 5d6ac150ab Renamed semi_terminated to semicolon_terminated 2021-10-23 23:20:45 +02:00
Alex Bethel 5634a8ad2b Get cart assignments working 2021-10-23 15:08:10 -06:00
Alex Bethel 5db6eebdc0 Almost get cart assignments working 2021-10-23 14:17:17 -06:00
Erin ae1416e329 Read in AST takes Assignable instead of Ident 2021-10-23 21:53:21 +02:00
Alex Bethel 706d39e860 Merge branch 'feature/line_continuations' 2021-10-23 12:46:05 -06:00
Erin bcd446c5d1 Moved Assignable creation functions 2021-10-21 20:51:24 +02:00
Erin 0f198a2554 Merge pull request #43 from T-Dark0/T-Dark_fix_brainfuck_overflows
Fixed integer overflows. Why did I even write `checked_add` in the first place?
2021-10-19 23:37:47 +02:00
Erin 3e8b80af2a Removed in_the_past_this_used_to_crash_but_not_anymore test 2021-10-19 23:35:46 +02:00
T-Dark 6779d7c898 Fixed integer overflows. Why did I even write in the first place? 2021-10-19 17:29:53 +01:00
Erin 610ba7fc40 Change Cart AssignableKind to Index. 2021-10-13 13:20:23 +02:00
Alex Bethel 31fe3f53be Sort of fix cart assignments 2021-10-12 14:33:23 -06:00
Erin cdf4c5a308 improvement 2021-10-12 22:22:33 +02:00
Erin 4c6dd311a7 Added Assignable support in parser / AST 2021-10-12 22:14:20 +02:00
Alex Bethel 6eb97c6032 Add statement continuation in REPL in CLI
Typing ```
var foo = [
``` into the REPL now causes it to prompt you to complete the
statement rather than just printing an "unexpected EOF" error.
2021-10-09 22:31:14 -06:00
Erin e47e739e02 Generalised some lexer functions 2021-10-04 23:03:23 +02:00
Erin 71c5738a6e Renamed Iden to Ident 2021-10-04 23:00:18 +02:00
Alex Bethel e8349bf0d9 Improve consistency of code & comments
Changed all `&str.to_string()` into `&str.to_owned()`, and made the
grammar of the `Value::into_*` comments uniform.
2021-09-04 10:54:53 -06:00
Erin a288db985d Variable name shortened 2021-09-02 18:36:25 +02:00
Erin 4d1e85a295 Fixed division
x/0 is now x/42 instead of 42 which makes it more confusing
2021-09-02 18:35:33 +02:00
Erin 113554428f Clippy 2021-09-01 17:46:17 +02:00
Erin 82c09e5b1b All operations except functio ones are implemented
- Aboolean logic
- Cart division/multiplication
2021-08-31 00:41:37 +02:00
Erin 14e9eb5c6b Implemented negation for most types 2021-08-30 23:19:25 +02:00
Alex Bethel 6f8a49b711 Add parsing negative numbers 2021-08-30 15:03:29 -06:00
Erin 82239be160 Not is now lexing and parsing correctly 2021-08-30 22:55:31 +02:00
Erin 92f2c62d59 Removed And and Or ops because they aren't cursed enough 2021-08-30 22:18:09 +02:00
Erin 49ba66de07 Most of operations are implemented 2021-08-30 22:14:13 +02:00
Erin 58f0645b54 fmt + docs 2021-08-29 00:34:08 +02:00
Erin 31296ec0b8 Used body length for AbleFunctio to i32 instead of AST length 2021-08-29 00:28:45 +02:00
Erin 7a275556c7 Revert "Eval errors are now correctly spanned"
This reverts commit 2f5b954b7c.
2021-08-29 00:26:40 +02:00
Erin 975655a96e Merge branch 'feature/coercions-and-ops' of https://github.com/ablecorp/able-script into feature/coercions-and-ops 2021-08-29 00:24:24 +02:00
Erin 2f5b954b7c Eval errors are now correctly spanned 2021-08-29 00:23:59 +02:00
Erin 3ce85a11ee Eval errors are now correctly spanned 2021-08-29 00:16:15 +02:00
Erin a8c603164c AbleFunctio's body length is now by it's string representation 2021-08-29 00:10:44 +02:00
Erin e30eef32b5 Eval's integer representation is now its length
- consistency with other types
2021-08-29 00:07:26 +02:00
Erin 1c8722ba99 Added placeholders for And + Or
and used placeholders for -, * and / in interpret
2021-08-28 23:59:04 +02:00
Erin c66616ee2c Fixed add overflows 2021-08-28 23:55:36 +02:00
Erin e8f08a90d5 Display carts sorted 2021-08-28 23:52:58 +02:00
Erin 4c74e3bef3 Implement custom PartialEq for Value 2021-08-28 23:43:59 +02:00
Erin 8b57cbe5a5 Most coercions implemented 2021-08-28 23:27:35 +02:00
Erin 2c36b2a5f7 Require space after owo for making comments. 2021-08-23 18:58:28 +02:00
Alex Bethel 4c3d44dfd8 Fix panics on invalid indexes 2021-08-16 15:06:40 -06:00