This patch adds support for underscores in numeric literals for Python 3.6 (from PEP 515)
BUG: 385422
dhaumann |
Kate |
This patch adds support for underscores in numeric literals for Python 3.6 (from PEP 515)
BUG: 385422
Test different numbers with underscore in the code editor sample.
an_int = 100_000_000
a_float = 100_0000_000.0
some_hex = 0xEAD2_DF24_3D
Automatic diff as part of commit; lint not applicable. |
Automatic diff as part of commit; unit tests not applicable. |
Hi,
I assume the regex are right ;=)
For the patch:
a) I think the version number must be increased
b) an extended unit test would be nice, to really show that the regex are right.
Hi, sure. Is there any documentation on how to make those tests? I noticed there are some ref and input files, do I just modify those and run the tests?
Yes, in the end that is the right process.
Add your new fragment to them, run them, look at the diffs, if they are OK, update the ref.
Btw: To update the reference, you can simply execute
build/frameworks/syntax-highlighting/autotests/update-reference-data.sh
Note, this script is in your *build* folder (not the git checkout folder).
Thanks for the tips guys!
This patch still has two problems (that I'm aware :) ):