Commit graph

177 commits

Author SHA1 Message Date
Alex Bethel 0bca9ff79c Get carts sort of working
still a bunch of `todo`s and needs a lot of work, but I'm hungry and
going on lunch break :)
2021-07-29 13:29:23 -05:00
Erin 603a244b78 Nest the loop inside a match arm 2021-07-29 19:17:10 +02:00
Erin 0d497bccdd Added cart parsing 2021-07-29 18:58:11 +02:00
Erin b53cc1e768 Not fails on cart contruction parsing, does nothing. 2021-07-29 18:17:08 +02:00
Erin bf2e73a5d1 Extracted construction of carts to separate function 2021-07-27 12:14:11 +02:00
Erin e7bd81e12a Implemented cart indexing parsing 2021-07-27 12:09:36 +02:00
Erin ab1515cdb0 Added arrow token 2021-07-27 11:52:43 +02:00
Erin e847a76c6d Added cart support into AST 2021-07-27 11:51:05 +02:00
Alex Bethel 282a9a6a07 Fix broken type_errors unit test 2021-07-22 22:27:17 -05:00
Alex Bethel 0b0a8942de Remove latent debug println for BFF input 2021-07-22 22:11:55 -05:00
Alex Bethel dcc0c0b00f Merge branch 'master' of github.com:AbleCorp/able-script 2021-07-22 22:09:40 -05:00
Alex Bethel 501d182fb4 Use coercion in BFF argument passing 2021-07-22 22:08:04 -05:00
Alex Bethel 50f9bfa4c6 Eliminate type errors
Hooray, we've just made a whole class of errors impossible! :D
2021-07-16 19:03:27 -05:00
Alex Bethel 821eeae322 Silently fail when calling a non-function
The most cursed possible way to deal with this error.
2021-07-16 19:02:51 -05:00
Alex Bethel d3242484fc Make integer coercion infallible 2021-07-16 18:56:45 -05:00
Erin 0c795741e8 Reduced parser boilerplate 2021-07-15 21:39:01 +02:00
Alex Bethel 141220fb38 Fix function call type error message 2021-07-15 14:24:07 -05:00
Alex Bethel 3d9f847862 Make consts accessible from AbleScript code 2021-07-13 14:22:06 -05:00
Alex Bethel a225105f09 Prettier error handling 2021-07-13 13:54:27 -05:00
Alex Bethel 8818536717 Revert "Update README.md"
This reverts commit e02edbbd16.

It is, in fact, still better than Javascript.
2021-07-01 17:17:48 -05:00
Alex Bethel bc7427014d Add more info to Cargo.toml 2021-06-30 16:45:44 -05:00
Alex Bethel 1e8314b1a1 Merge branch 'feature/read' 2021-06-19 17:34:19 -05:00
Alex Bethel c1cc54be75 Merge 'feature/forty-two' into master 2021-06-19 17:32:12 -05:00
Alex Bethel eee173060c Implement read semantics in interpreter
Also added a test file `iotest.able` to just read data and print
it (the `cat` of AbleScript I guess).
2021-06-18 16:05:50 -05:00
Erin 3edbca51d5 Implemented read in Parser 2021-06-18 20:28:53 +02:00
Alex Bethel 430f0c2b90 Forbid use of unwrap w/ clippy 2021-06-16 10:36:52 -05:00
Alex Bethel 4011997e60 Clippy conformance 2021-06-16 10:35:06 -05:00
Alex Bethel cdb4a22443 Add --debug option for printing AST 2021-06-16 10:29:27 -05:00
Alex Bethel 098137082e Better error messages, remove debug AST printing 2021-06-16 10:25:55 -05:00
Alex Bethel 2e5799d9e6 Remove quotes around rickroll string
They're not necessary, because the `rickroll` file is already included
as a string.
2021-06-15 11:47:39 -05:00
Alex Bethel 9965d97713 Fix ignored unit tests in interpret.rs 2021-06-15 11:46:01 -05:00
Alex Bethel d1064802ec Fix unit tests 2021-06-15 11:29:52 -05:00
Alex Bethel 8aa6fc502a rustfmt: whoops, let's put a semicolon there
maybe I should have actually looked at what rustfmt produced before I
just blindly accepted it and pushed it onto master.
2021-06-15 10:26:44 -05:00
Alex Bethel 7bf3cc6f5d rustfmt: break long line 2021-06-15 10:24:50 -05:00
Alex Bethel ae0955209c Use pass-by-reference for variables, pass-by-value for expressions 2021-06-15 09:51:00 -05:00
Alex Bethel 66d4f4f82d Implement most of pass-by-reference
We need some parser changes to make it work fully: function arguments
are now identifiers rather than expressions.
2021-06-15 09:51:00 -05:00
Alex Bethel 4b0aa1602b Lack of else statements is intentional 2021-06-15 09:51:00 -05:00
Alex Bethel d80c138735 Improve pass-by-reference test 2021-06-15 09:51:00 -05:00
Alex Bethel d59b75fdb3 Add pass-by-reference test (doesn't work yet)
Also rename the "hello_world.able" test to "hello-world.able" for
consistency.
2021-06-15 09:51:00 -05:00
Alex Bethel 75938f27c0 Implement functio declaration & calling 2021-06-15 09:51:00 -05:00
Able c2de1f6411 Merge pull request #33 from HTG-YT/master 2021-06-15 04:39:07 -05:00
HTG-YT aa72945010 comply with the move of rickroll 2021-06-14 20:53:27 +08:00
HTG-YT 26df745dee move rickroll to src/ folder 2021-06-14 20:52:38 +08:00
HTG-YT 953128887b Update rickroll 2021-06-14 09:42:38 +08:00
HTG-YT b526d5c575 move rickroll content into a file 2021-06-14 09:42:23 +08:00
HTG-YT 712e6cef67 Create rickroll 2021-06-14 09:41:20 +08:00
HTG-YT 72e48d1b86 rustfmt: add trailing comma 2021-06-14 09:40:42 +08:00
HTG-YT 327466cddc Merge branch 'AbleCorp:master' into master 2021-06-14 09:40:00 +08:00
Erin 93289e02f1 Added build staus badge 2021-06-13 18:43:09 +02:00
Erin 232595c1be Added CI config
Rust Template
2021-06-13 18:14:41 +02:00