diff options
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/parsermodule.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Modules/parsermodule.c b/Modules/parsermodule.c index bead663..8c57f86 100644 --- a/Modules/parsermodule.c +++ b/Modules/parsermodule.c @@ -1754,17 +1754,17 @@ validate_import_name(node *tree) && validate_dotted_as_names(CHILD(tree, 1))); } -/* Helper function to count the number of leading dots in +/* Helper function to count the number of leading dots (or ellipsis tokens) in * 'from ...module import name' */ static int count_from_dots(node *tree) { - int i; - for (i = 1; i < NCH(tree); i++) - if (TYPE(CHILD(tree, i)) != DOT) - break; - return i-1; + int i; + for (i = 1; i < NCH(tree); i++) + if (TYPE(CHILD(tree, i)) != DOT && TYPE(CHILD(tree, i)) != ELLIPSIS) + break; + return i - 1; } /* import_from: ('from' ('.'* dotted_name | '.'+) |