Commit graph

145 commits

Author SHA1 Message Date
Alex Bethel ca61561ade 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 90c3e31824 Fix ignored unit tests in interpret.rs 2021-06-15 11:46:01 -05:00
Alex Bethel c35f3d80ff 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 f02b33d564 rustfmt: break long line 2021-06-15 10:24:50 -05:00
Alex Bethel 0e6bf2b27e Use pass-by-reference for variables, pass-by-value for expressions 2021-06-15 09:51:00 -05:00
Alex Bethel 5ac9117651 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 f06fba1741 Lack of else statements is intentional 2021-06-15 09:51:00 -05:00
Alex Bethel da53ba4040 Improve pass-by-reference test 2021-06-15 09:51:00 -05:00
Alex Bethel 817ca7cf9a 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 e709f398f7 Implement functio declaration & calling 2021-06-15 09:51:00 -05:00
Able a1aa4edc30 Merge pull request #33 from HTG-YT/master 2021-06-15 04:39:07 -05:00
HTG-YT aa33fe88db comply with the move of rickroll 2021-06-14 20:53:27 +08:00
HTG-YT 6a01893f2e move rickroll to src/ folder 2021-06-14 20:52:38 +08:00
HTG-YT 552c793e2f Update rickroll 2021-06-14 09:42:38 +08:00
HTG-YT 087768fcbc move rickroll content into a file 2021-06-14 09:42:23 +08:00
HTG-YT acff3e2139 Create rickroll 2021-06-14 09:41:20 +08:00
HTG-YT 7ceab0d3fd rustfmt: add trailing comma 2021-06-14 09:40:42 +08:00
HTG-YT cbe07d87db Merge branch 'AbleCorp:master' into master 2021-06-14 09:40:00 +08:00
Erin 9912ea4b9b Added build staus badge 2021-06-13 18:43:09 +02:00
ondra05 6e13e9163f Added CI config
Rust Template
2021-06-13 18:14:41 +02:00
ondra05 7ca5917d59 Update README.md 2021-06-13 18:12:21 +02:00
HTG-YT aa5000c6c8 handle Token::Rickroll in parser 2021-06-13 13:24:09 +08:00
HTG-YT 1bba812018 Update interpret.rs 2021-06-13 13:22:30 +08:00
HTG-YT 141feac31c handle StmtKind::Rickroll 2021-06-13 13:22:01 +08:00
HTG-YT f9f891cd20 add StmtKind::Rickroll 2021-06-13 13:11:51 +08:00
HTG-YT 3ffdd15b41 add rickroll lexeme in lexer 2021-06-13 13:11:02 +08:00
Alex Bethel 1a8f17339e Reimplement BF function declaration semantics 2021-06-12 09:26:21 -05:00
Erin ae3a7b7c8a Better comment 2021-06-11 19:44:53 +02:00
Erin 76e5fb9043 Removed todo when unknown token 2021-06-11 18:34:34 +02:00
Erin 8dbf93caa5 Fixed invalid spanning of UnexpectedToken in parse_expr 2021-06-11 18:31:25 +02:00
Erin f3c459f26e BF code is now Vec<u8> 2021-06-11 18:10:11 +02:00
Erin eecde7635c Basic BfFunctio support 2021-06-11 17:52:47 +02:00
Alex Bethel 2a428e8415 Re-enable assignment semantics 2021-06-11 10:05:48 -05:00
Erin 588f69b710 Added variable assignment to parser
- Fixed parse error, that `rlyeh` returned HopBack
2021-06-11 16:59:40 +02:00
ondra05 0046149c0d Merge pull request #29 from HTG-YT/interpreter-fixes
add `interessant`, `nevergonnagiveyouup` and `funny` constants
2021-06-11 09:33:48 +02:00
HTG-YT 6a6658fd75 add nevergonnagiveyouup constant 2021-06-11 15:26:30 +08:00
HTG-YT 6d7fbb3514 add interessant and funny constants 2021-06-11 15:19:27 +08:00
Alex Bethel 0fe7819e28 Fix interpreter variable persistence bug 2021-06-08 19:21:33 -05:00
Alex Bethel 39c5709db7 Better error handling in REPL
We have much better spanned expression support, so now we get to show
it off!
2021-06-07 20:08:38 -05:00
Alex Bethel bdb32c4599 Remove 0..0 placeholder from unexpected_eof() 2021-06-07 20:03:26 -05:00
Alex Bethel dfededfe26 Fix all 0..0 span placeholders in interpret.rs 2021-06-07 19:57:44 -05:00
Alex Bethel b6a4ecba29 Fix unit tests 2021-06-07 17:35:49 -05:00
Alex Bethel aedeeb2512 Remove giant comment block left in by mistake 2021-06-07 16:28:27 -05:00
Alex Bethel 3bca3f88a6 Repair interpreter after parser changes 2021-06-07 16:20:20 -05:00
Erin 717d592710 Added T-Dark test 2021-06-07 23:06:13 +02:00
Erin 84f58dab3d Added tests, Bugfix
- Originally, it spanned from operator (bug)
2021-06-07 22:58:28 +02:00
Erin 99ebd71dac Added missing mut 2021-06-07 22:24:43 +02:00
Erin 7b1546387e Unified span terminology
- Add more derivations, because it's required by another parts of project
2021-06-07 22:21:21 +02:00
Erin beffef80c6 Changed position terminology 2021-06-07 21:28:24 +02:00
Erin 17a7f33c0b Removed unwraps, added Rlyeh 2021-06-07 11:07:50 +02:00