8000 bpo-40528: Improve & clear a bunch of internal asdl thing by isidentical · Pull Request #19952 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

bpo-40528: Improve & clear a bunch of internal asdl thing #19952

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 6, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
dont use switch default
  • Loading branch information
isidentical committed May 6, 2020
commit 1dfdffb6266cdd9eb194c6ff5131bcfcef8b4dc3
4 changes: 2 additions & 2 deletions Parser/Python.asdl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
-- ASDL's 5 builtin types are:
-- identifier, int, string, object, constant
-- ASDL's 4 builtin types are:
-- identifier, int, string, constant

module Python
{
Expand Down
3 changes: 1 addition & 2 deletions Parser/asdl_c.py
Original file line number Diff line number Diff line change
Expand Up @@ -1145,9 +1145,8 @@ def simpleSum(self, sum, name):
self.emit("case %s:" % t.name, 2)
self.emit("Py_INCREF(astmodulestate_global->%s_singleton);" % t.name, 3)
self.emit("return astmodulestate_global->%s_singleton;" % t.name, 3)
self.emit("default:", 2)
self.emit("Py_UNREACHABLE();", 3);
self.emit("}", 1)
self.emit("Py_UNREACHABLE();", 1);
self.emit("}", 0)

def visitProduct(self, prod, name):
Expand Down
15 changes: 5 additions & 10 deletions Python/Python-ast.c

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0