Commit Graph

842 Commits

Author SHA1 Message Date
K Lange
3bd27cd847 Arrow operator for return types was missing from PARSE_RULES 2021-03-13 14:25:44 +09:00
K Lange
9ea28e77f1 Add class and module member annotations 2021-03-13 14:22:32 +09:00
K. Lange
b243aabc82 Add more docstrings to builtins 2021-03-12 20:17:53 +09:00
K. Lange
d147de2d7f Let the scanner attempt to continue when unget() was called twice 2021-03-12 19:42:18 +09:00
K. Lange
d3a614869a Fix leak in compiler when a truncated escape sequence is encountered 2021-03-12 19:42:02 +09:00
K. Lange
307f5e7200 Free source chars when string allocation failed due to invalid UTF-8 sequence 2021-03-12 19:41:32 +09:00
K. Lange
55e6752b8c Free instances first on shutdown so we can be sure their classes are still around for gcsweep binds 2021-03-12 19:41:04 +09:00
K. Lange
a19c39e011 Be more thorough in freeVM 2021-03-12 19:40:29 +09:00
K. Lange
57b7f76244 Don't let garbage collection close stdin/out/err 2021-03-12 19:40:05 +09:00
K Lange
d23aed51b2 Eliminate global calls to listOf, dictOf with cleaner comprehensions 2021-03-12 15:40:07 +09:00
K. Lange
1b101af1a3 let 'function' type be subscripted for annotations 2021-03-12 12:25:01 +09:00
K. Lange
efdb743c54 Type hint expressions must not be assignment expressions 2021-03-11 21:05:25 +09:00
K Lange
49ee777c50 Type annotations. 2021-03-11 20:44:39 +09:00
K Lange
e3a7dc002f Add __class_getitem__, GenericAlias in prep for type hints 2021-03-11 19:06:07 +09:00
K Lange
f655ca7f61 Fix up function, object repring and add __qualname__ to functions 2021-03-11 19:05:21 +09:00
K. Lange
1201dc8115 Move birthday for exception objects to the start of the except block 2021-03-11 13:57:11 +09:00
K. Lange
63d7c8af97 Implicitly instantiate classes passed to 'raise' 2021-03-11 12:32:35 +09:00
K. Lange
9924b35e77 What if we just... called finalize again on property assignment... 2021-03-11 10:02:23 +09:00
K Lange
3c97754365 Fix filter object passing wrong argument to condition function 2021-03-10 23:29:58 +09:00
K. Lange
c305f790b5 Add some docstrings for property objects 2021-03-10 21:19:55 +09:00
K. Lange
f0ee256060 Fix doc generator for new property attribute layout 2021-03-10 21:18:48 +09:00
K. Lange
6b3f8de63b Implement general __get__/__set__ descriptors
property objects are no longer a special case and have been simplified
old-style native properties can probably all be removed as well, but, todo
2021-03-10 20:24:12 +09:00
K. Lange
96a403b34c Allow parenthesized from ... import (...) lists 2021-03-10 16:36:19 +09:00
K. Lange
540a9aea0d Fix bug in json float parsing found by WASM IDE's static analyzer 2021-03-10 14:35:14 +09:00
K. Lange
c9aa17e119 Rename __get__, __set__ to match Python's __getitem__, __setitem__ and make room for future addition of descriptors 2021-03-10 14:24:22 +09:00
K Lange
aaac0c168a Add krk_valueGetAttribute_default 2021-03-09 23:34:57 +09:00
K. Lange
05f7d9537a Add tests related to recent class method changes 2021-03-09 23:00:47 +09:00
K. Lange
5d508bcc17 Implement tuple.__init__ 2021-03-09 22:55:40 +09:00
K. Lange
e38648c9fb krk_debug_dumpStack() should accept NULL for frame arg 2021-03-09 22:55:27 +09:00
K. Lange
84b7a37fab Remove the distinction between a class's 'fields' and 'methods' and implement actual method resolution 2021-03-09 22:35:40 +09:00
K. Lange
1530e5338f Remove a debug output line from debug.c that was tripping format string warnings 2021-03-09 18:29:23 +09:00
K. Lange
e3e1fbb13a Wrap hardcoded docstrings behind a macro so they can be removed from builds 2021-03-09 17:58:38 +09:00
K. Lange
fc9f55efb1 Enable rline for input() 2021-03-09 13:26:51 +09:00
K. Lange
7fd6ac6007 Fixup signal handling and add input() in main interpreter 2021-03-09 12:47:24 +09:00
K. Lange
eb711ac3a9 Bail early in more fileio functions on interrupt 2021-03-09 12:33:53 +09:00
K. Lange
fa185ce460 Clear signal flag before raising exception for it 2021-03-09 12:30:49 +09:00
K Lange
05892e91bc Add zip(), fixup stack oddness with map(), enumerate() 2021-03-08 18:11:18 +09:00
K. Lange
5dfbf8ec17 Various cleanups 2021-03-08 16:36:12 +09:00
K. Lange
90f4c75127 Add enumerate() 2021-03-08 14:49:17 +09:00
K. Lange
36b2f40582 Really make sure we're breaking out of the right loop in list.extend() on exception 2021-03-08 14:48:59 +09:00
K. Lange
9229bc0899 Attach a dummy __doc__ for -c option so strings don't throw syntax error 2021-03-08 11:08:33 +09:00
K. Lange
e6ef1ea1e4 Add bin() 2021-03-08 10:52:57 +09:00
K. Lange
cebac67366 Add filter() 2021-03-08 10:28:24 +09:00
K. Lange
68cc31e24d Add map() 2021-03-08 10:05:06 +09:00
K. Lange
0c9d0cff91 list.extend needs to bail earlier on exception (tbf everything does) 2021-03-08 10:03:43 +09:00
K Lange
57a5b891db Add a handful of missing builtins 2021-03-07 23:39:12 +09:00
K. Lange
ab1fa2c4fe Fix str.join() when argument is an iterable and not a native sequence 2021-03-07 22:37:00 +09:00
K. Lange
1809ebf99e Okay quite a bit was wrong with that, but now it's right 2021-03-06 18:00:14 +09:00
K. Lange
0c08398e4a Fix stack stupidity with generators 2021-03-06 17:20:02 +09:00
K. Lange
8dddcfa2e0 Don't use a leaky call to realpath in findInterpreter 2021-03-06 16:22:54 +09:00