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.

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

4040 r"\/\*.*?\*\/" +
4141 add +
4242 r"|(?:\d+\')+\d+" +
43+ r"|0x(?:[0-9A-Fa-f]+\')+[0-9A-Fa-f]+" +
44+ r"|0b(?:[01]+\')+[01]+" +
4345 r"|\w+" +
4446 r"|\"(?:\\.|[^\"\\])*\"" +
4547 r"|\'(?:\\.|[^\'\\])*?\'" +

The check that tells the two apart

failpass·test/test_languages/testCAndCPP.py::Test_c_cpp_lizard::test_bin_number_with_thousands_separator_since_cpp14
failpass·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