Windel Bouwman
5053d6d167
Add bytes literal support.
2018-10-28 21:15:46 +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
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
09e2c027cd
Extend ast module with more nodes. Test send method on generators.
2018-10-24 16:02:59 +02:00
Windel Bouwman
babb8ed2f0
Deleted comparison based on objectkind
2018-10-24 12:02:16 +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
bc23e60962
Add generator expression syntax
2018-10-20 12:16:18 +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
8f3e1a3b25
Add error handling to compiler.
2018-10-19 20:51:50 +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
5707548436
Add set.add method
2018-10-17 21:08:46 +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
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
adfb750129
Added ternary if operator
2018-10-17 08:45:16 +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
Windel Bouwman
133d72fcb1
Add tokenize module. Change call_method to take a reference to a PyObjectRef. Add new method to list class.
2018-10-14 15:21:48 +02:00
Windel Bouwman
c94c5f7049
Add keyword module
2018-10-10 19:40:52 +02:00
Windel Bouwman
7b005c75a3
Merge branch 'master' of https://github.com/RustPython/RustPython into with
2018-09-12 19:05:29 +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
Windel Bouwman
797e7f341f
Merge branch 'master' of https://github.com/RustPython/RustPython into with
2018-09-11 19:21:13 +02:00
Daniel Watkins
c5e36e8530
Ignore clippy warnings in lalrpop generated code
2018-09-11 00:11:03 -04: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
Daniel Watkins
ad0d03b7cf
Fix and expand function parsing Rust tests
2018-08-31 16:23:25 -04:00
Daniel Watkins
b4662925b7
Naively parse keyword arguments
...
This doesn't enforce ordering of non-keyword and keyword arguments, and
doesn't actually use the keywords (the arguments will still be passed
through in order as positional).
2018-08-31 15:46:07 -04:00
Daniel Watkins
cb173c1fa8
Update and expand Rust tests for function parsing
2018-08-29 08:58:20 -04:00
Daniel Watkins
85d2dd2997
Add support for default argument syntax
...
The enforcement of the ordering of default/non-default arguments happens
in the compiling step, but should perhaps eventually be pushed back in
to the parsing phase.
2018-08-29 08:58:20 -04:00
Daniel Watkins
2cecd362fe
Add support for defaults to bytecode, compiler and VM
2018-08-29 08:58:20 -04:00
Windel Bouwman
3f7986c811
Address review comments
2018-08-26 22:01:00 +02:00
Windel Bouwman
96ee1cce60
Add filename and row to traceback
2018-08-26 12:17:16 +02:00
Daniel Watkins
159a524f3f
Don't double-count newlines in comments
...
lex_comment doesn't consume the newlines, (correctly) leaving them to
the regular newline parsing. As such, it shouldn't call self.new_line,
or we end up double-counting lines.
2018-08-25 10:54:31 -04:00
Windel Bouwman
6aa9c01180
Merge branch 'master' of https://github.com/RustPython/RustPython into exceptions
2018-08-25 10:18:51 +02:00
Windel Bouwman
882606ba1a
Move exceptions to own struct
2018-08-25 10:11:21 +02:00
Daniel Watkins
a06044dc6b
Reject newlines in single-quoted strings
2018-08-25 00:21:37 -04:00
Daniel Watkins
367806f845
Increment lexer row count for newlines in strings
2018-08-25 00:20:03 -04:00
Adam Kelly
046e5e9c60
Add unary not support to parser.
2018-08-24 18:23:05 +01:00
Windel Bouwman
04b786f0f3
Add try except to compiler
2018-08-22 21:42:18 +02:00
Windel Bouwman
583818378b
Add BaseException class
2018-08-22 20:29:47 +02:00