Last active
January 31, 2016 04:19
-
-
Save miyakogi/a7675a5a6e0d3eaea982 to your computer and use it in GitHub Desktop.
Jedi's patch to support type hints in python3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/jedi/parser/grammar3.4.txt b/jedi/parser/grammar3.4.txt | |
index d4a32b8..45f733f 100644 | |
--- a/jedi/parser/grammar3.4.txt | |
+++ b/jedi/parser/grammar3.4.txt | |
@@ -27,7 +27,8 @@ parameters: '(' [typedargslist] ')' | |
typedargslist: (tfpdef ['=' test] (',' tfpdef ['=' test])* [',' | |
['*' [tfpdef] (',' tfpdef ['=' test])* [',' '**' tfpdef] | '**' tfpdef]] | |
| '*' [tfpdef] (',' tfpdef ['=' test])* [',' '**' tfpdef] | '**' tfpdef) | |
-tfpdef: NAME [':' test] | |
+tname: NAME [':' test] | |
+tfpdef: tname | |
varargslist: (vfpdef ['=' test] (',' vfpdef ['=' test])* [',' | |
['*' [vfpdef] (',' vfpdef ['=' test])* [',' '**' vfpdef] | '**' vfpdef]] | |
| '*' [vfpdef] (',' vfpdef ['=' test])* [',' '**' vfpdef] | '**' vfpdef) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
気持ち悪いけど変更点を減らして2.7に近づけるためにalias的な感じに修正