From 918fa48eda9255427a6568632f9a6e40643fe1c9 Mon Sep 17 00:00:00 2001 From: Myeongseon Choi Date: Wed, 13 Jul 2022 19:42:46 +0900 Subject: [PATCH] Change a short name of Bool and None changes a short name of True, False, None from "keyword" to "True", "False", "None" themselves --- ast/src/impls.rs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/ast/src/impls.rs b/ast/src/impls.rs index 666acd1fd..a93028874 100644 --- a/ast/src/impls.rs +++ b/ast/src/impls.rs @@ -20,7 +20,14 @@ impl ExprKind { | Constant::Complex { .. } | Constant::Bytes(_) => "literal", Constant::Tuple(_) => "tuple", - Constant::Bool(_) | Constant::None => "keyword", + Constant::Bool(b) => { + if *b { + "True" + } else { + "False" + } + } + Constant::None => "None", Constant::Ellipsis => "ellipsis", }, ExprKind::List { .. } => "list",