Commit Graph

24 Commits

Author SHA1 Message Date
Tom Forbes
a72dbf1d0c Use XDG paths to store Python history 2019-02-03 10:07:50 +01:00
coolreader18
1f02cc0fa3 Squash all demo commits onto one branch 2018-12-27 20:28:12 -06:00
AgentMacklin
79a3b13252 Implement most of the string methods. (#239)
* implemented more functions

* backup

* Improve demo site

* Formatting; move the `+ '\n'` hack to eval().

* Rename run_code() to run_from_textbox()

* Switch to using json.dumps for py_to_js()

* Clarify names of wasm builtins

* Remove dependency on num_bigint

* Allow injecting JS variables into python with eval_py()

eval_py(`return js_vars["a"]`, { a: 9 }) == 9

* dict() now should work properly

e.g.
``` dict(a=2, b=3) == {"a": 2, "b": 3} ```

* Add documentation for eval_py() and update error message handling

Also, switch from iterating over the values of js_injections and
serializing each of them individually to asserting it's an object and
then just stringifying the whole thing.

* Finish revamping `dict_new()`

* Add 'from x import *' syntax.

This is a separate opcode in CPython so I added it as such here.

* Add test for dicts

* added functions

* ran rustfmt and fixed isidentifier

* fixed zfill and make_title

* python3.6 doesn't contain isascii()
2018-12-27 20:22:04 +01:00
coolreader18
4c32693c7b Switch to using one workspace, move profile to root Cargo.toml 2018-12-24 15:28:49 -06:00
Windel Bouwman
f227ce0498 Add random module 2018-11-25 23:20:10 +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
a6f64eefee Change int __pow__ to use bigint pow. 2018-11-03 10:30:17 +01:00
Windel Bouwman
f6cced5d65 Change integer type into bigint 2018-10-30 21:01:31 +01:00
Windel Bouwman
1e3b45ee0d Add complex basic type 2018-10-29 21:55:58 +01:00
Windel Bouwman
adfb750129 Added ternary if operator 2018-10-17 08:45:16 +02:00
Windel Bouwman
bccb6f3bf5 Add draft re module 2018-10-14 10:59:00 +02:00
Windel Bouwman
5e27cc45b0 Initial struct module 2018-10-13 22:04:49 +02:00
Daniel Watkins
3b1536277e Bump version of petgraph in Cargo.lock to 0.4.13
This should fix #102 (i.e. compilation on rust nightly).
2018-08-29 12:38:39 -04:00
Daniel Watkins
2cecd362fe Add support for defaults to bytecode, compiler and VM 2018-08-29 08:58:20 -04:00
Daniel Watkins
7a80c04725 Basic json module implementation in rust 2018-08-26 15:10:39 -04:00
Windel Bouwman
bbc19305f8 Reduce dependencies of vm and parser crates 2018-07-18 10:22:00 +02:00
Windel Bouwman
3349e24aad Early import mechanics 2018-07-11 23:33:59 +02:00
Windel Bouwman
7d20869dc0 Fix return value from function 2018-07-08 21:03:25 +02:00
Windel Bouwman
b4e9064516 Try to repair cpython bytecode frontend 2018-07-08 00:22:30 +02:00
Windel Bouwman
3f98e3c64a Reverse dependency between vm and cpython bytecode adapter 2018-07-07 23:19:06 +02:00
Windel Bouwman
7a719190f3 Move compiler function to top level and try to emit code 2018-07-03 19:38:09 +02:00
Shing Lyu
277124fc1f Make the parser and vm two separate crates 2018-06-07 00:09:09 +02:00
Shing Lyu
93b6ce31c0 Moved rspython to parser folder and created top level project 2018-06-06 23:11:24 +02:00
Windel Bouwman
cb394ebdc4 Initial import from rspython repo 2018-06-01 21:36:19 +02:00