Commit Graph

347 Commits

Author SHA1 Message Date
K. Lange
2f78ae8770 maybe support __eq__? 2021-01-05 17:41:32 +09:00
K. Lange
181e378628 Add class name to method __repr__ 2021-01-05 15:36:09 +09:00
K. Lange
ab158260f7 improve disassembly somewhat and add dis module 2021-01-05 15:33:33 +09:00
K. Lange
04391ebbaa add exit() to repl 2021-01-05 13:43:47 +09:00
K. Lange
7e2c515de6 Fix tuple repr to call repr and not str 2021-01-05 13:37:39 +09:00
K. Lange
8d02420d4d add .__args__ property to functions 2021-01-05 13:37:26 +09:00
K. Lange
57455ea80d basic lambda expressions (TODO: needs complex argument lists) 2021-01-05 13:28:45 +09:00
K. Lange
a4885833c5 add paste() to repl to disable automatic indentation 2021-01-05 12:53:51 +09:00
K. Lange
f764c059fe compiler support for tuple expressions 2021-01-05 12:07:55 +09:00
K. Lange
3016b1be34 add tuple.__contains__ 2021-01-05 11:42:08 +09:00
K. Lange
7a91678701 Use tuples to store range data for faster lookup 2021-01-05 11:39:20 +09:00
K. Lange
c8758c9ffb Add tuple type to store immutable lists 2021-01-05 11:38:11 +09:00
K. Lange
20d5ce47bf Work towards generalizing fast calls 2021-01-05 09:30:23 +09:00
K. Lange
f771c8a428 fileio gc fixups 2021-01-05 07:51:42 +09:00
K. Lange
0f6e823095 Make sure cached modules don't get garbage collected 2021-01-05 07:51:35 +09:00
K. Lange
3aa984c139 fixup gc collection of function argument names 2021-01-05 07:44:03 +09:00
K Lange
ff8ed02ebd Make print() a function before it's too late 2021-01-04 23:34:10 +09:00
K. Lange
d87fd9b1bd Commit results of test cases as of now (not sure if they're all correctly) 2021-01-04 21:50:20 +09:00
K. Lange
bc12529e75 Fix some test cases for expect testing 2021-01-04 21:44:16 +09:00
K. Lange
e5a1756543 Remove some tests that make too much output 2021-01-04 21:43:51 +09:00
K. Lange
017d1e3ff8 This isn't great but I don't want to deal with it properly right now 2021-01-04 21:43:05 +09:00
K. Lange
bb676a7f4d We had another bug with moving stacks... 2021-01-04 21:39:18 +09:00
K. Lange
feeaa30d11 Fix missing comma in test case for whitespace eating 2021-01-04 21:23:55 +09:00
K. Lange
5c1d8f24b6 more AOC test cases 2021-01-04 20:27:32 +09:00
K. Lange
f4cbf2ec38 this is now a late AOC2020 repo 2021-01-04 20:10:39 +09:00
K. Lange
6195649458 More test scripts 2021-01-04 19:59:11 +09:00
K. Lange
873ffb3428 Eat empty line in block? 2021-01-04 19:56:13 +09:00
K. Lange
f1ebada908 Add string iterators 2021-01-04 19:34:56 +09:00
K. Lange
7b8df5d4da More test files 2021-01-04 19:07:46 +09:00
K. Lange
8f2e7f237e List slicing and a gc fix for iterators 2021-01-04 19:07:39 +09:00
K. Lange
bfae38538d Need to turn off whitespace eating _before_ the close paren 2021-01-04 19:07:19 +09:00
K. Lange
61a38f3a5f That dup isn't necessary 2021-01-04 18:15:17 +09:00
K. Lange
b93429d6a6 Oops, fix strings; simplify bytecode around getters/setters; use this approach for slicing 2021-01-04 18:10:55 +09:00
K. Lange
49b7eb2941 Super speedy getters and setters 2021-01-04 17:47:53 +09:00
K. Lange
49d2a26aa4 repl must reset stack after printing values since they run without a callframe 2021-01-04 17:47:44 +09:00
K. Lange
fb9d0163ef Some more objects 2021-01-04 17:29:06 +09:00
K. Lange
66533d5c23 C-ify a bunch of basic builtin functions 2021-01-04 16:21:59 +09:00
K. Lange
eb383e7663 Support __call__ on instances 2021-01-04 16:21:27 +09:00
K. Lange
a1f29ee399 Fixup dirObject which we broke with __inrepr 2021-01-04 16:20:50 +09:00
K. Lange
cfecb2e4f6 Accept BIG_STRING as __doc__ 2021-01-04 16:20:01 +09:00
K. Lange
9941889f54 str.__contains__ 2021-01-04 14:03:19 +09:00
K. Lange
583df9141c 'not in' comparison 2021-01-04 14:03:08 +09:00
K. Lange
2f5b7ef262 Add str.split() 2021-01-04 12:47:57 +09:00
K. Lange
d1c2d3f234 Add str.join() 2021-01-04 12:01:50 +09:00
K. Lange
b25f2e6c73 Implement str.format() 2021-01-04 11:29:33 +09:00
K. Lange
b8c89c0550 add ValueError to builtin exceptions 2021-01-04 11:27:33 +09:00
K. Lange
3fd9bfecde Demonstrate how Python's default args behavior can be emulated 2021-01-04 10:02:44 +09:00
K. Lange
90a4dd678d Ignore line feeds and indentation in some contexts 2021-01-04 09:49:56 +09:00
K. Lange
132542c6ab allow 'elif' for Python compatibility 2021-01-04 09:13:39 +09:00
K. Lange
3415fd4e73 from foo import bar as baz 2021-01-04 07:48:56 +09:00