summaryrefslogtreecommitdiffstatshomepage
path: root/py/parse.c
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2014-08-15 16:45:41 +0100
committerDamien George <damien.p.george@gmail.com>2014-08-15 16:45:41 +0100
commit2ac4af6946543ae96cf3659468e1b8cabb057f85 (patch)
tree2e19460fec67666259afe529e7f4dff71b6451cf /py/parse.c
parent6be0b0a8ec9a6badc601190ccee876755ce7efb7 (diff)
downloadmicropython-2ac4af6946543ae96cf3659468e1b8cabb057f85.tar.gz
micropython-2ac4af6946543ae96cf3659468e1b8cabb057f85.zip
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/parse.c')
-rw-r--r--py/parse.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/py/parse.c b/py/parse.c
index 2a74c59a8e..26713dfe71 100644
--- a/py/parse.c
+++ b/py/parse.c
@@ -578,7 +578,7 @@ mp_parse_node_t mp_parse(mp_lexer_t *lex, mp_parse_input_kind_t input_kind, mp_p
// never emit these rules if they have only 1 argument
// NOTE: can't put atom_paren here because we need it to distinguisg, for example, [a,b] from [(a,b)]
// TODO possibly put varargslist_name, varargslist_equal here as well
- if (rule->rule_id == RULE_else_stmt || rule->rule_id == RULE_testlist_comp_3b || rule->rule_id == RULE_import_as_names_paren || rule->rule_id == RULE_typedargslist_name || rule->rule_id == RULE_typedargslist_colon || rule->rule_id == RULE_typedargslist_equal || rule->rule_id == RULE_dictorsetmaker_colon || rule->rule_id == RULE_classdef_2 || rule->rule_id == RULE_with_item_as || rule->rule_id == RULE_assert_stmt_extra || rule->rule_id == RULE_as_name || rule->rule_id == RULE_raise_stmt_from || rule->rule_id == RULE_vfpdef) {
+ if (rule->rule_id == RULE_else_stmt || rule->rule_id == RULE_testlist_comp_3b || rule->rule_id == RULE_import_as_names_paren || rule->rule_id == RULE_typedargslist_name || rule->rule_id == RULE_typedargslist_colon || rule->rule_id == RULE_typedargslist_equal || rule->rule_id == RULE_dictorsetmaker_colon || rule->rule_id == RULE_classdef_2 || rule->rule_id == RULE_with_item_as || rule->rule_id == RULE_assert_stmt_extra || rule->rule_id == RULE_as_name || rule->rule_id == RULE_raise_stmt_from || rule->rule_id == RULE_vfpdef || rule->rule_id == RULE_funcdefrettype) {
emit_rule = false;
}