One function
CodeReader in terryyin/lizard
The author described this change as “Fix parsing of C++14 ' separator with 0x and 0b”. It counts as a record because the checks below fail on the code as it stood at 7b47f8885 and pass on c17ccbbe5, with nothing else changed between the two runs.
Projectterryyin/lizard
Fix saved2024-08-24
Sharing licenceMIT · LICENSE.txt
Change size+2 −0
What the code was meant to do, written into the code itself as a docstring
CodeReaders are used to parse function structures from code of different language. Each language will need a subclass of CodeReader.
The change
| 40 | 40 | r"\/\*.*?\*\/" + | |
| 41 | 41 | add + | |
| 42 | 42 | r"|(?:\d+\')+\d+" + | |
| 43 | + | r"|0x(?:[0-9A-Fa-f]+\')+[0-9A-Fa-f]+" + | |
| 44 | + | r"|0b(?:[01]+\')+[01]+" + | |
| 43 | 45 | r"|\w+" + | |
| 44 | 46 | r"|\"(?:\\.|[^\"\\])*\"" + | |
| 45 | 47 | r"|\'(?:\\.|[^\'\\])*?\'" + |
The check that tells the two apart
fail→pass·test/test_languages/testCAndCPP.py::Test_c_cpp_lizard::test_bin_number_with_thousands_separator_since_cpp14
fail→pass·test/test_languages/testCAndCPP.py::Test_c_cpp_lizard::test_hex_number_with_thousands_separator_since_cpp14
Check file test/test_languages/testCAndCPP.py, taken without changes from the fix and copied onto the older code, so the exact same check runs against both versions.
Origin and history
The code before it7b47f8885eb694e6ec82df21e024f2b5265ffba9
Broken version dated2024-04-25
Modulelizard_languages.code_reader
Units changedCodeReader
Fingerprinte64e26e2753ec281
Checked2026-08-18 by goldset/0.1
Every field above is generated by our program. None of it is written by hand.
Other bugs found in terryyin/lizard
- 2026-08-08fix(java): do not report control structures as methods
- 2026-07-02HalsteadClassifier
- 2026-07-02fix(csv): emit columns for extensions with multiple FUNCTION_INFO fields
- 2026-06-15fix(golike): register generic functions with [...] type params
- 2026-06-15fix(java): enhance parsing of generic and qualified type names in anonymous classes
- 2026-06-11fix(script): stop a '#' comment continuing past a trailing backslash (#317)