diff options
| author | Damien George <damien.p.george@gmail.com> | 2014-08-15 16:45:41 +0100 |
|---|---|---|
| committer | Damien George <damien.p.george@gmail.com> | 2014-08-15 16:45:41 +0100 |
| commit | 2ac4af6946543ae96cf3659468e1b8cabb057f85 (patch) | |
| tree | 2e19460fec67666259afe529e7f4dff71b6451cf /py/emitcpy.c | |
| parent | 6be0b0a8ec9a6badc601190ccee876755ce7efb7 (diff) | |
py: Allow viper to have type annotations.
Viper functions can now be annotated with the type of their arguments
and return value. Eg:
@micropython.viper
def f(x:int) -> int:
return x + 1
Diffstat (limited to 'py/emitcpy.c')
| -rw-r--r-- | py/emitcpy.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/py/emitcpy.c b/py/emitcpy.c index c0d15a871..4d0c08522 100644 --- a/py/emitcpy.c +++ b/py/emitcpy.c @@ -63,7 +63,7 @@ emit_t *emit_cpython_new(uint max_num_labels) { return emit; } -STATIC void emit_cpy_set_native_types(emit_t *emit, bool do_native_types) { +STATIC void emit_cpy_set_native_type(emit_t *emit, mp_uint_t op, mp_uint_t arg1, qstr arg2) { } STATIC void emit_cpy_start_pass(emit_t *emit, pass_kind_t pass, scope_t *scope) { @@ -822,7 +822,7 @@ STATIC void emit_cpy_setup_loop(emit_t *emit, uint label) { } const emit_method_table_t emit_cpython_method_table = { - emit_cpy_set_native_types, + emit_cpy_set_native_type, emit_cpy_start_pass, emit_cpy_end_pass, emit_cpy_last_emit_was_return_value, |
