Batuhan Taskaya <isidenti...@gmail.com> added the comment:

I'm very late to join this thread, but since the Constant() node has now a kind 
field, we can possibly add this (though I'm not saying we should, depending on 
whether still this would be a nice addition to clinic docstrings.)

2 options that I can think off:
- Introduce a couple of new tokens (BIN_NUMBER, OCT_NUMBER, HEX_NUMBER). 
- Add a new field to the tok_state struct (like const char* number_type) and 
when constructing the Constant node in the _PyPegen_number_token, add that 
number_type as the kind field of the constant.

In case of anyone wondering, the latter would be a +20 lines addition (no 
changes on the grammar / tokens, just a couple of new lines into the tokenizer 
and the _PyPegen_number_token.)

----------
nosy: +BTaskaya

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue16801>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to