Commit Graph

184 Commits (trunk)

Author SHA1 Message Date
ondra05 4ab63aea47 Added escapes test 2022-04-24 23:47:51 +02:00
ondra05 c7ea807a8e Added some comments 2022-04-24 23:33:11 +02:00
ondra05 b462fd9c8f Implemented string unicode escapes 2022-04-24 23:29:15 +02:00
ondra05 83e395ff7b sus 2022-04-24 22:01:31 +02:00
ondra05 827a13f358 Double Melo causes variable deletion 2022-04-22 21:14:53 +02:00
ondra05 b035138998 Rc is got by reference by default 2022-04-22 21:09:03 +02:00
ondra05 b0e8acd438 Reimplemented Melo
- Variable made into enum of `ValueRef or Melo`
- Melo-ing variable causes dropping of the Rc, decreasing reference count
2022-04-22 21:06:34 +02:00
ondra05 53e2b0677a clearer comment 2022-04-18 22:09:56 +02:00
ondra05 5c11cd39bb Made Parser private and made `parse` function
Parser had only consturctor and parse functions public.

Likely, there would be just a creation of parser followed by .parse(),
and now this action is performed in `parse` function.
2022-04-18 22:09:41 +02:00
ondra05 dbe4835732 Renamed init function in parser 2022-04-18 22:01:35 +02:00
ondra05 6d195747e2 Added crate-level docs for ablescript 2022-04-18 21:59:57 +02:00
ondra05 4c218e3ab8 chore: fmt 2022-04-18 21:43:32 +02:00
ondra05 141164b46a fixed comments and naming 2022-04-18 21:43:19 +02:00
ondra05 097a5571ae replaced if with unless 2022-04-18 21:42:26 +02:00
ondra05 df32550844 Chars are no longer special case of identifiers 2022-04-18 21:04:19 +02:00
ondra05 e24bc5af35 Expr::Literal contains Literal type which contains only possible types instead of any Value 2022-04-18 20:56:11 +02:00
ondra05 0ef7177a03 Changed variable declaration / assignment and equals syntax:
- `dim <ident> [value];` is now used for declaration
- `<value> =: <assignable>` is used for assignments
- As token `=` doesn't cause any ambiguity now, it can be used for equals operation
2022-04-18 20:34:08 +02:00
ondra05 e1f7533b2d No underscore! 2022-04-16 22:06:37 +02:00
ondra05 8234a9d9fe fmt 2022-04-12 22:15:53 +02:00
ondra05 95ecbdf4ce version bump 2022-04-12 14:17:20 +02:00
ondra05 2cdce8f77e dependency update + fmt 2022-04-12 14:16:34 +02:00
ondra05 87555a6184 removed `!=` in favour of `ain't` 2022-04-08 17:44:35 +02:00
ondra05 4c20ef179e Removed ! for ain't 2022-04-08 17:39:14 +02:00
Alex Bethel 96f2db4dc6 `cargo fmt` 2022-04-02 12:42:40 -06:00
ondra05 f842733757 removed \ from idents 2022-04-02 20:39:48 +02:00
ondra05 ddb15ba540 changed line order 2022-04-02 14:13:49 +02:00
ondra05 3bb1039e1d This isn't AbleScript, we can just negate expressions :D 2022-04-02 13:44:29 +02:00
ondra05 34cef2c613 Small change 2022-04-02 01:42:13 +02:00
ondra05 1dc9979738 Removed ident type, fixed tests 2022-04-02 01:34:25 +02:00
ondra05 75df416679 Generalised Spanned items 2022-04-02 01:22:46 +02:00
ondra05 6cfd26dcc2 Simplified base 55 2022-04-02 01:06:47 +02:00
ondra05 8f6d2483f3 fixed tests 2022-03-30 21:03:17 +02:00
ondra05 bdbf8d0a29 Improved type coercions 2022-03-30 20:56:59 +02:00
ondra05 c867ad8406 Removed booleans 2022-03-30 20:55:05 +02:00
ondra05 7cc456ee40 Used checked next in require 2022-03-20 02:20:55 +01:00
ondra05 8b5be3d90f Changed way of String lexing 2022-03-13 13:18:51 +01:00
ondra05 6ea380f3a0 Added support for idents starting with _ 2022-03-12 23:26:39 +01:00
ondra05 d47bd65387 fixed spelling of ain't 2022-03-02 11:36:08 +01:00
ondra05 c3a51e3221 \ is valid part of identifiers 2022-03-01 23:07:23 +01:00
ondra05 0dee4ad9ab Introduced newtype for `Rc<RefCell<Value>>` 2022-03-01 22:13:49 +01:00
ondra05 acb9bed2aa Satisfied most of THE ALLMIGHTY CLIPPY's requests. 2022-03-01 21:53:58 +01:00
ondra05 816cb9ac82 Bool, Abool and Nil values are no longer tokens 2022-03-01 18:57:03 +01:00
ondra05 8c369d5cfc fixed strings 2022-02-24 21:53:43 +01:00
ondra05 260e9efa84 Rust 2021
- Consts map generated using iterators
2022-02-23 21:47:07 +01:00
ondra05 f703a2546d Fixed tests and examples 2022-02-22 22:49:56 +01:00
ondra05 ae7d3c6680 Changed string delimiters
You know what could be cursed? Using Rust's block comment syntax as String delimiters!
2022-02-22 22:39:03 +01:00
ondra05 9a93202979 Removed unused tokens from Lexer
Uh, they were lying there with no use for 9 months!
2022-02-22 22:31:05 +01:00
ondra05 e37931111f Exposed variables to public API 2022-02-14 00:12:03 +01:00
ondra05 3b81883b80 Add from_value variable constructor 2022-02-14 00:11:37 +01:00
ondra05 5f4c0da06a added new_with_vars 2022-02-14 00:08:48 +01:00
ondra05 4d6dd0e58b Fixed all errors 2022-02-13 00:58:50 +01:00
ondra05 9e8456195c fixed base 55 2022-02-13 00:55:51 +01:00
ondra05 3dd91b0c97 Value::Int is isize 2022-02-13 00:55:19 +01:00
ondra05 a46b9ea910 Changed Built-in functio -> integer coercion 2022-02-13 00:37:17 +01:00
ondra05 84f519a2e5 Implemented builtin functio division 2022-02-13 00:30:40 +01:00
ondra05 2ecb492356 implemented subtraction for built-in functios 2022-02-13 00:25:56 +01:00
ondra05 785bce3095 Implemented not for built-in functios 2022-02-13 00:07:23 +01:00
ondra05 6f489d5435 Implemented Display for built-ins 2022-02-12 22:52:14 +01:00
ondra05 ebd8a28a83 Implemented coercions for built-in functios 2022-02-12 22:10:30 +01:00
ondra05 013c324a8e Implemented built-in functios
- Missing coercions and operations
2022-02-12 21:14:55 +01:00
ondra05 4386e31ea5 Functio -> Int more cursed 2022-01-22 21:02:10 +01:00
ondra05 f4f7b102eb Cart -> Int more cursed 2022-01-22 20:52:09 +01:00
ondra05 ae15f6cfb3 Implemented [] as length operator 2022-01-22 20:48:21 +01:00
ondra05 622ce45435 Implemented Len in parser 2022-01-22 20:37:44 +01:00
Alex Bethel d59d75c6a2 Add martens owo 2021-12-29 17:06:46 -06:00
Alex Bethel 235a5ae3a0 Merge branch 'feature/coercions' of ssh://git.ablecorp.us:20/AbleScript/able-script into feature/coercions 2021-12-14 16:16:44 -06:00
Alex Bethel f549c08a8f Implement function chain division 2021-12-14 16:16:28 -06:00
ondra05 220d85355a Fixed T-Dark blocks in blocks 2021-12-14 23:16:19 +01:00
ondra05 fe1f20a925 Removed clone 2021-12-14 23:05:21 +01:00
ondra05 a7d0766eb7 Renamed stuff 2021-12-14 23:02:55 +01:00
Alex Bethel 7655090c06 Arity-based functio deinterlacing 2021-12-14 15:56:40 -06:00
ondra05 7aa2d67449 🚗 Implemented ordered functio chaining 2021-12-14 21:45:44 +01:00
ondra05 a722ea00d5 Removed a feature which disallowed comments in functios 2021-12-14 21:10:58 +01:00
ondra05 3358234914 Implemented subtraction for functio chains... maybe? 2021-12-09 17:51:03 +01:00
ondra05 3f1b6d2387 Implemented coercions when subtracting able functios 2021-12-09 17:18:37 +01:00
ondra05 647fffbfd2 Who cares about the content, we have 256 commits!
And I readded a thing
2021-12-09 00:38:36 +01:00
ondra05 784992e65e sync 2021-12-09 00:35:43 +01:00
ondra05 9b242843a1 Git things beyond your comprehension mortals 2021-12-09 00:34:41 +01:00
ondra05 7525b434e6 Implemented halfway of functio sub 2021-12-09 00:33:45 +01:00
Alex Bethel 4851e0375a Function division 2021-12-08 16:33:06 -07:00
ondra05 d8ecfed5d5 Made Clippy happy (so he will not kill us in sleep) 2021-12-08 22:56:12 +01:00
Alex Bethel 91204c2b5f Use b-string instead of array of b-chars 2021-12-08 14:39:04 -07:00
ondra05 77a2395dd4 Implemented Abool -> Functio 2021-12-07 22:58:41 +01:00
Alex Bethel 0217f25aa8 Better BF function conversions 2021-12-07 14:27:45 -07:00
Alex Bethel b23963137a I made a cursed thing 😂 2021-12-07 14:24:58 -07:00
ondra05 bc3f16ba40 Implemented Functio to Aboolean 2021-12-07 21:57:37 +01:00
ondra05 9e41f8de07 huh??? 2021-12-07 21:20:24 +01:00
ondra05 c85e6e9257 Fmt! 2021-12-07 21:20:16 +01:00
ondra05 2d1d0eef5e Function negation 2021-12-07 21:18:45 +01:00
Alex Bethel 2faf90430e Merge branch 'fix/unused-code' 2021-11-27 17:20:54 -06:00
Alex Bethel 1f7073b8e6 Fix unused code warnings 2021-11-27 11:15:29 -06:00
Alex Bethel 145a7efbcf Avoid trailing comma in cart printout 2021-11-27 11:11:03 -06:00
Alex Bethel b59b165c1c 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 1fd6f65400 Assign read syntax 2021-11-05 17:09:53 -06:00
Alex Bethel 7e339f5535 Coerce indexing assignments into non-carts 2021-11-05 16:18:07 -06:00
ondra05 9067a05426 Renamed `semi_terminated` to `semicolon_terminated` 2021-10-23 23:20:45 +02:00
Alex Bethel fe6f7599fb Get cart assignments working 2021-10-23 15:08:10 -06:00
Alex Bethel 978aee3597 Almost get cart assignments working 2021-10-23 14:17:17 -06:00
ondra05 aedc2f12b1 Read in AST takes Assignable instead of Ident 2021-10-23 21:53:21 +02:00
Alex Bethel 2b322c00cc Merge branch 'feature/line_continuations' 2021-10-23 12:46:05 -06:00