Commit 943cab2f authored by Mark Dickinson's avatar Mark Dickinson

Issue #14741: Merge fix from 3.2.

parents 72f6095d da029fb2
...@@ -110,6 +110,8 @@ class RoundtripLegalSyntaxTestCase(unittest.TestCase): ...@@ -110,6 +110,8 @@ class RoundtripLegalSyntaxTestCase(unittest.TestCase):
self.check_expr("lambda x, *y, **z: 0") self.check_expr("lambda x, *y, **z: 0")
self.check_expr("(x for x in range(10))") self.check_expr("(x for x in range(10))")
self.check_expr("foo(x for x in range(10))") self.check_expr("foo(x for x in range(10))")
self.check_expr("...")
self.check_expr("a[...]")
def test_simple_expression(self): def test_simple_expression(self):
# expr_stmt # expr_stmt
......
...@@ -20,6 +20,8 @@ Core and Builtins ...@@ -20,6 +20,8 @@ Core and Builtins
Library Library
------- -------
- Issue #14741: Fix missing support for Ellipsis ('...') in parser module.
- Issue #14697: Fix missing support for set displays and set comprehensions in - Issue #14697: Fix missing support for set displays and set comprehensions in
parser module. parser module.
......
...@@ -2419,17 +2419,13 @@ validate_atom(node *tree) ...@@ -2419,17 +2419,13 @@ validate_atom(node *tree)
break; break;
case NAME: case NAME:
case NUMBER: case NUMBER:
case ELLIPSIS:
res = (nch == 1); res = (nch == 1);
break; break;
case STRING: case STRING:
for (pos = 1; res && (pos < nch); ++pos) for (pos = 1; res && (pos < nch); ++pos)
res = validate_ntype(CHILD(tree, pos), STRING); res = validate_ntype(CHILD(tree, pos), STRING);
break; break;
case DOT:
res = (nch == 3 &&
validate_ntype(CHILD(tree, 1), DOT) &&
validate_ntype(CHILD(tree, 2), DOT));
break;
default: default:
res = 0; res = 0;
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment