Adam
d278fb841c
Merge pull request #597 from RustPython/type_hints
...
Add type annotations to parser.
2019-03-05 14:43:30 +00:00
Ryan Liddle
b7c03b4be5
Merge pull request #601 from RustPython/ellipsis
...
Add ellipsis syntax.
2019-03-05 18:30:44 +11:00
Windel Bouwman
05929b3d7b
Add ellipsis type, test and do rustfmt.
2019-03-05 07:19:00 +01:00
Windel Bouwman
a26401707f
Minor lexer simplifications.
2019-03-04 21:25:35 +01:00
Windel Bouwman
e25742f184
Add ellipsis syntax.
2019-03-04 21:09:03 +01:00
Windel Bouwman
f7a22254a6
Add return annotation and fix tests in parser.
2019-03-04 20:29:34 +01:00
Windel Bouwman
6544f60d9b
Add type annotations to parser.
2019-03-04 19:24:34 +01:00
coolreader18
c99e843769
Fix a clippy lint I missed
2019-03-01 20:13:50 -06:00
Windel Bouwman
9404c7c657
Merge pull request #548 from rickyhan/new_vm_fns
...
Move set_item to DictProtocol
2019-02-27 09:40:12 +01:00
Windel Bouwman
28d5acc25c
Merge pull request #552 from AaronRocinante/lexer_handle_random_byte
...
add lexer error
2019-02-27 08:13:19 +01:00
ricky han
ec93c55e6d
rustfmt
2019-02-26 18:37:40 -05:00
Aaron
267934bb49
fmt
2019-02-26 12:50:18 -08:00
Aaron
b1088c629c
fmt
2019-02-26 00:55:16 -08:00
Aaron
b0bf93e530
add lexer error
2019-02-25 21:13:18 -08:00
Ricky Han
6f85a44f7c
cargo fmt
2019-02-25 16:35:19 -05:00
Joey Hain
f050acba73
f-strings: allow ':' and '!' to be used in the expression
2019-02-24 21:13:08 -08:00
Joey Hain
ddc154a1dd
f-strings: support conversion flags
2019-02-24 14:37:59 -08:00
Joey Hain
d6e317b185
Move f-string parser into own module and clean up a bit
2019-02-24 13:01:25 -08:00
Joey
7e40b7f648
Compile error message cleanup
2019-02-21 08:27:35 -08:00
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
114d9df1d1
Allow attributes to be used as decorators
2019-02-16 19:43:25 -08: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
a97e05a164
Add missing semicolon to Bytes rule
2019-02-13 23:11:54 -08:00
Joey Hain
7d743de43f
fix another edge case
2019-02-13 22:28:16 -08:00
Windel Bouwman
33d272f795
Merge pull request #464 from holygits/internal-error-types
...
Introduce Parser and Compiler Errors
2019-02-14 07:07:21 +01: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
Adrian Wielgosik
7dfb0728fd
Change lambda parsing to be closer to Python grammar. Fixes #427
2019-02-13 21:01:13 +01:00
Tommaso Thea Cioni
8ffd4c5e56
Fixed #402 . ( #414 )
...
Raise syntax error rather than panicking on expected closing bracket.
* Fixed #402 .
2019-02-09 18:10:40 +00:00
klemens
79a7e5e42b
spelling fixes
2019-02-09 12:00:46 +01:00
Windel Bouwman
2b22cd443e
Implement clippy thoughts into rustpython_parser
2019-02-04 18:18:40 +01:00
Windel Bouwman
caac5a34d5
Merge branch 'master' into tuple_add
2019-02-04 08:05:07 +01:00
Takanori Ishibashi
334d78704a
distuingish -> distinguish
2019-02-03 21:41:04 +09:00
ben
b13b4741ad
Add tuple.__add__. Also stop rustfmt from trying to format generated parser.
2019-02-02 17:40:17 +13:00
Gitea
9468b657d2
Run cargo fmt.
2018-12-16 17:40:25 -05:00
Gitea
c74cd90d8e
Handle mixed spaces and tabs.
...
This allows the parser to handle tabs and spaces. Currently it
requires that spaces come after any tabs, which is slightly more
strict than python3. It also requires that neighboring indentation
levels have either both more spaces and tabs or less spaces and
tabs so that tab size can't make perception of indentation
differ from what the parser interprets.
I didn't opt to implement PartialOrd on IndentationLevel because I
wasn't sure that the comparison logic would meet the logical
requirements for that trait. One could easily switch to having it
implement PartialOrd though. This would necessitate switching to
manually implementing PartialEq so that it's behavior 'matches'.
It's unclear from the docs what 'matches' exactly means so for
now I'm avoiding implementing the traits.
2018-12-16 17:11:37 -05:00
Windel Bouwman
99af466a88
Move max function test cases to snippet dir. Implement key and default argument on max function.
2018-11-07 17:26:18 +01: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
079905277b
Add time module and improve lexer handling of numeric constants
2018-11-03 15:12:12 +01:00
Windel Bouwman
b7a0b0f2f3
Removal of ToRust trait to prevent incorrect str representation
2018-11-02 20:27:05 +01:00
Windel Bouwman
1e3b45ee0d
Add complex basic type
2018-10-29 21:55:58 +01:00