mirror of
https://github.com/python/cpython.git
synced 2025-11-25 04:34:37 +00:00
create NameConstant AST class for None, True, and False literals (closes #16619)
This commit is contained in:
parent
4b237e3b11
commit
442f20996d
15 changed files with 152 additions and 72 deletions
|
|
@ -1,4 +1,4 @@
|
|||
-- ASDL's five builtin types are identifier, int, string, bytes, object
|
||||
-- ASDL's six builtin types are identifier, int, string, bytes, object, singleton
|
||||
|
||||
module Python
|
||||
{
|
||||
|
|
@ -69,8 +69,8 @@ module Python
|
|||
| Num(object n) -- a number as a PyObject.
|
||||
| Str(string s) -- need to specify raw, unicode, etc?
|
||||
| Bytes(bytes s)
|
||||
| NameConstant(singleton value)
|
||||
| Ellipsis
|
||||
-- other literals? bools?
|
||||
|
||||
-- the following expression can appear in assignment context
|
||||
| Attribute(expr value, identifier attr, expr_context ctx)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue