summaryrefslogtreecommitdiff
path: root/Parser/Python.asdl
diff options
context:
space:
mode:
Diffstat (limited to 'Parser/Python.asdl')
-rw-r--r--Parser/Python.asdl12
1 files changed, 6 insertions, 6 deletions
diff --git a/Parser/Python.asdl b/Parser/Python.asdl
index c24d840619..debd89edb8 100644
--- a/Parser/Python.asdl
+++ b/Parser/Python.asdl
@@ -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)
@@ -103,11 +103,11 @@ module Python
excepthandler = ExceptHandler(expr? type, identifier? name, stmt* body)
attributes (int lineno, int col_offset)
- arguments = (arg* args, identifier? vararg, expr? varargannotation,
- arg* kwonlyargs, identifier? kwarg,
- expr? kwargannotation, expr* defaults,
- expr* kw_defaults)
+ arguments = (arg* args, arg? vararg, arg* kwonlyargs, expr* kw_defaults,
+ arg? kwarg, expr* defaults)
+
arg = (identifier arg, expr? annotation)
+ attributes (int lineno, int col_offset)
-- keyword arguments supplied to call
keyword = (identifier arg, expr value)