This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author BTaskaya
Recipients Arfrever, BTaskaya, barry, carsten.klein@axn-software.de, eric.araujo, ezio.melotti, georg.brandl, larry, mark.dickinson, r.david.murray, rhettinger, serhiy.storchaka, terry.reedy
Date 2020-11-15.18:27:00
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1605464820.91.0.764120015841.issue16801@roundup.psfhosted.org>
In-reply-to
Content
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.)
History
Date User Action Args
2020-11-15 18:27:00BTaskayasetrecipients: + BTaskaya, barry, georg.brandl, rhettinger, terry.reedy, mark.dickinson, larry, ezio.melotti, eric.araujo, Arfrever, r.david.murray, carsten.klein@axn-software.de, serhiy.storchaka
2020-11-15 18:27:00BTaskayasetmessageid: <1605464820.91.0.764120015841.issue16801@roundup.psfhosted.org>
2020-11-15 18:27:00BTaskayalinkissue16801 messages
2020-11-15 18:27:00BTaskayacreate