Commit Graph

72 Commits

Author SHA1 Message Date
coolreader18
e35cc813a8 Rename to Unnamed and Named 2019-03-20 08:59:37 -05:00
coolreader18
ff5c203b0e impl From<&ast::Varargs> for bytecode::Varargs 2019-03-19 20:13:03 -05:00
coolreader18
ab53883f67 Change varargs from Option<Option<_>> to its own enum 2019-03-19 19:53:22 -05:00
Windel Bouwman
69efc7f223 Compile type annotations on function. 2019-03-06 13:48:30 +01:00
Windel Bouwman
e25742f184 Add ellipsis syntax. 2019-03-04 21:09:03 +01:00
Windel Bouwman
7bb6f8fdaa Minor clippy fix. 2019-03-02 11:22:40 +01:00
Windel Bouwman
c8afeae0f7 Merge pull request #577 from RustPython/kill_scope_variant
Remove Scope variant from PyObject.
2019-03-02 10:30:41 +01:00
coolreader18
f364ea5943 Fix a bunch of clippy lints 2019-03-01 18:41:45 -06:00
Adam Kelly
c2e2441388 Remove Scope variant from PyObject. 2019-03-01 20:47:09 +00:00
Joey Hain
ddc154a1dd f-strings: support conversion flags 2019-02-24 14:37:59 -08:00
Adam Kelly
4b03e6d706 Add Display implementation for CodeObject. 2019-02-21 14:02:59 +00:00
Joey Hain
b310d5e24b Use i-methods for in-place operations 2019-02-17 10:47:58 -08:00
Joey Hain
134c3b94a5 support format specs in f-strings 2019-02-15 18:18:44 -08:00
Joey Hain
400ad80b64 fstrings 2019-02-13 21:59:21 -08:00
Adam Kelly
8a89e13a7e Add .co_consts to code class. 2019-02-12 09:47:02 +00:00
Adam Kelly
8cc2d5f091 Move implementation of CodeObject after Instructions. 2019-02-12 09:40:55 +00:00
Adam Kelly
769b889097 Source path should always be set, make it non-optional for code object. 2019-02-09 12:22:51 +00:00
Adam Kelly
7d08867419 Record first line number in code object. 2019-02-09 12:15:16 +00:00
ZapAnton
fb9fa27555 Fixed the 'redundant_field_names' clippy warnings
This replaces all the occurrences of the Struct {field : field}
with the Struct {field}.

Relevant clippy warning: https://rust-lang.github.io/rust-clippy/master/index.html#redundant_field_names
2019-02-05 21:56:16 +03:00
Gitea
ac3da8b453 Add 'from x import *' syntax.
This is a separate opcode in CPython so I added it as such here.
2018-12-22 22:40:02 -05:00
Windel Bouwman
5ffb20b26e Add builtin oct function. Add weakref.ref class. 2018-11-04 12:07:53 +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
bddaf3e77e Implement while-else and for-else. Call __neg__ and __invert__ methods on unary operation. 2018-10-31 21:50:00 +01:00
Windel Bouwman
1e3b45ee0d Add complex basic type 2018-10-29 21:55:58 +01:00
Windel Bouwman
5053d6d167 Add bytes literal support. 2018-10-28 21:15:46 +01:00
Windel Bouwman
e6fd9fb0a0 Add double star arguments in function calls 2018-10-28 20:05:05 +01:00
Windel Bouwman
3f6c716b37 Implement star expand argument in function call. 2018-10-28 19:16:21 +01:00
Windel Bouwman
4187a6ee39 Add support for star expanded argument in list and tuple constructions. 2018-10-28 14:16:11 +01:00
Windel Bouwman
1f30693718 Allow unpack in assignment of list as well as trailing comma for 1 sized tuples 2018-10-28 00:26:24 +02:00
Windel Bouwman
a3a427c252 Add 'yield from' syntax 2018-10-27 17:05:22 +02:00
Windel Bouwman
acefe3841e Add initial generator builtin type 2018-10-23 21:27:40 +02:00
Windel Bouwman
1222830678 Implement star arg on left hand side of assignment. 2018-10-22 21:52:06 +02:00
Windel Bouwman
f59f8a9567 Add support for *args and **kwargs in functions. 2018-10-21 20:48:08 +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
7e45d0b8b4 Add del statement 2018-10-19 18:41:44 +02:00
Windel Bouwman
e334941728 Removal of Clone trait on ast nodes. Should reduce codesize somewhat. 2018-10-17 22:04:02 +02:00
Windel Bouwman
96d35ad4f9 Generalize comprehensions for list, dict and set. 2018-10-17 20:10:26 +02:00
Windel Bouwman
a450c0e3da Add builtin type set 2018-10-17 17:14:46 +02:00
Windel Bouwman
6105a836ad Initial variant of list comprehensions 2018-10-17 12:05:10 +02:00
Windel Bouwman
9bf1cb3db8 First simple variant of with-statement operational. 2018-09-10 21:20:23 +02:00
Windel Bouwman
0f148e1214 Merge branch 'master' of https://github.com/RustPython/RustPython into with 2018-09-10 20:10:38 +02:00
Windel Bouwman
1eab9165bf Initial work on 'with' context manager logic 2018-09-10 20:10:31 +02:00
Adam Kelly
a14b776a81 Add tuple packing/unpacking assignment. (tuples only) 2018-09-09 21:19:56 +01:00
Windel Bouwman
8b3a95c562 Add code object name to traceback 2018-09-02 11:54:52 +02:00
Daniel Watkins
764e0af433 Emit CallFunctionKw from compiler for kwarg calls 2018-08-31 15:46:07 -04:00
Daniel Watkins
d4461d7703 Add bytecode::Constant::Tuple 2018-08-29 18:51:25 -04:00
Daniel Watkins
2cecd362fe Add support for defaults to bytecode, compiler and VM 2018-08-29 08:58:20 -04:00
Adam Kelly
a59c4536d9 unittests for compilation of if statements. 2018-08-27 14:26:13 +01:00
Daniel Watkins
767ceaefb5 Start storing the source_path of a code object
This will be required for (at least) import and exception display.
2018-08-25 19:45:19 -04:00
Adam Kelly
2b6cab4e97 Add JumpIfFalse instruction to avoid negation. 2018-08-24 18:23:05 +01:00