create NameConstant AST class for None, True, and False literals (closes #16619)

This commit is contained in:
Benjamin Peterson 2012-12-06 17:41:04 -05:00
parent 4b237e3b11
commit 442f20996d
15 changed files with 152 additions and 72 deletions

View file

@ -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)