Commit Graph

44 Commits

Author SHA1 Message Date
Joey
df76ffe116 Replace most relative imports with 2018-style crate 2019-02-20 08:50:53 -08:00
Windel Bouwman
e058179b04 Merge pull request #458 from ZapAnton/2018_edition
Migrated the project to the Rust 2018 edition
2019-02-20 16:44:31 +01:00
Joey Hain
134c3b94a5 support format specs in f-strings 2019-02-15 18:18:44 -08:00
Joey Hain
5968c4d922 convert f-string parser to state machine 2019-02-15 18:14:33 -08:00
Joey Hain
fb4d55bd8f Fix f-string edge case and add more tests 2019-02-14 18:46:23 -08:00
ZapAnton
f1654cb890 Migrated the project to the Rust 2018 edition 2019-02-14 12:02:32 +03:00
Joey Hain
bc4e48ae61 Fix tests 2019-02-13 23:32:55 -08:00
Joey Hain
4ca3d3b507 Merge remote-tracking branch 'upstream/master' into fstrings 2019-02-13 23:16:40 -08:00
Joey Hain
7d743de43f fix another edge case 2019-02-13 22:28:16 -08:00
Joey Hain
400ad80b64 fstrings 2019-02-13 21:59:21 -08:00
holygits
570b28439a Fix tests 2019-02-14 12:31:20 +13:00
holygits
4453c3e561 Create error types for parser and compiler
Pass through locations and tokens in ParseError
2019-02-14 10:21:21 +13:00
Windel Bouwman
5ffb20b26e Add builtin oct function. Add weakref.ref class. 2018-11-04 12:07:53 +01:00
Windel Bouwman
9364902768 Add tilde unary operator in syntax. 2018-11-04 09:30:13 +01:00
Windel Bouwman
17fc5a2345 Implemented hexadecimal, octal and binary literals. Also use bigint in the lexer to store big integer literals. 2018-11-04 09:00:44 +01:00
Windel Bouwman
b7a0b0f2f3 Removal of ToRust trait to prevent incorrect str representation 2018-11-02 20:27:05 +01:00
Windel Bouwman
29ce0cf2e7 Add support for if-filters in list comprehensions. 2018-10-27 11:35:46 +02:00
Windel Bouwman
b03dd623c7 Add raw strings to lexer. Add line break continuation to lexer. 2018-10-27 10:30:11 +02:00
Windel Bouwman
940c41bda8 Reduce lalrpop generated code size by about half. Relates to issue #173. 2018-10-21 16:01:39 +02:00
Windel Bouwman
ae768c7fe6 Add parsing for star arg parameters. 2018-10-20 11:47:23 +02:00
Windel Bouwman
e92ba94c61 Modify ast regarding keyword arguments. 2018-10-19 22:45:24 +02:00
Windel Bouwman
96d35ad4f9 Generalize comprehensions for list, dict and set. 2018-10-17 20:10:26 +02:00
Windel Bouwman
c9aa103cce Change target of for loops into single expression. 2018-10-17 13:12:04 +02:00
Windel Bouwman
6105a836ad Initial variant of list comprehensions 2018-10-17 12:05:10 +02:00
Windel Bouwman
7728ee1e63 Minor change to keyword arguments in function call 2018-10-16 23:26:37 +02:00
Windel Bouwman
3eafcbec3d Add decorator functionality 2018-10-14 20:04:19 +02:00
Daniel Watkins
23910f78e7 Accept slices to function calls
Instead of allocated types, per [0].

[0] https://rust-lang-nursery.github.io/rust-clippy/v0.0.212/index.html#ptr_arg
2018-09-11 15:05:33 -04:00
Adam Kelly
a14b776a81 Add tuple packing/unpacking assignment. (tuples only) 2018-09-09 21:19:56 +01:00
Daniel Watkins
ad0d03b7cf Fix and expand function parsing Rust tests 2018-08-31 16:23:25 -04:00
Daniel Watkins
cb173c1fa8 Update and expand Rust tests for function parsing 2018-08-29 08:58:20 -04:00
Windel Bouwman
c2550ad3f1 Introduce LocatedStatement after idea from review 2018-08-22 17:49:07 +02:00
Windel Bouwman
4897e10714 Add location to statement ast type 2018-08-22 16:18:47 +02:00
Windel Bouwman
15e274210f Add float type 2018-08-20 21:22:14 +02:00
Adam Kelly
a9c3349943 Specify bases in normal class definitions. 2018-08-19 20:55:37 +01:00
Daniel Watkins
2a90df80c8 Run cargo fmt to format the entire project 2018-08-10 20:23:15 -04:00
Adam Kelly
402230684f Add support for parsing classes to ast. 2018-08-09 07:41:33 +01:00
Adam Kelly
c6ef62ceac Improved interpreter using compile single and with multiline input. 2018-08-04 20:47:34 +01:00
Adam Kelly
a9afa76438 Test that an empty line parses. 2018-08-04 20:47:34 +01:00
Adam Kelly
976c1f4340 Update lexer and parser to support lambdas. 2018-07-28 10:09:08 +01:00
Windel Bouwman
e47e5f3d05 Add else statement 2018-07-15 16:54:29 +02:00
Windel Bouwman
b653b96a46 Autoformatting 2018-07-15 13:16:00 +02:00
Windel Bouwman
36bef81ceb Change eval compile to statement 2018-07-14 16:03:50 +02:00
Windel Bouwman
5783133565 Add eval and exec compile modes 2018-07-14 15:17:19 +02:00
Windel Bouwman
4be77bcbc7 Remove unused compiler namespace in parser 2018-07-07 17:36:21 +02:00