From 3fb5fe8c77d79e07b9adf70bd6277cf320cf8ce4 Mon Sep 17 00:00:00 2001 From: Claude Date: Tue, 9 Feb 2016 11:22:17 +0100 Subject: [PATCH] allow empty bodies for better autocompletion --- jedi/parser/grammar3.5.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/jedi/parser/grammar3.5.txt b/jedi/parser/grammar3.5.txt index 99fcea02..a647880f 100644 --- a/jedi/parser/grammar3.5.txt +++ b/jedi/parser/grammar3.5.txt @@ -82,7 +82,9 @@ with_stmt: 'with' with_item (',' with_item)* ':' suite with_item: test ['as' expr] # NB compile.c makes sure that the default except clause is last except_clause: 'except' [test ['as' NAME]] -suite: simple_stmt | NEWLINE INDENT stmt+ DEDENT +# Edit by David Halter: The stmt is now optional. This reflects how Jedi allows +# classes and functions to be empty, which is beneficial for autocompletion. +suite: simple_stmt | NEWLINE INDENT stmt* DEDENT test: or_test ['if' or_test 'else' test] | lambdef test_nocond: or_test | lambdef_nocond