Whole file

ShivamSarodia/ShivyC

The author described this change as Fix error collection in lexer. It counts as a record because the check below fails on the code as it stood at 21a412ca9 and passes on 3d9d3ad14, with nothing else changed between the two runs.

Fix saved2017-04-18
Sharing licenceMIT · LICENSE
Change size+1 1

What the code was meant to do, written into the code itself as a save note

Fix error collection in lexer

The change

163163 return
164164
165165 descrip = "unrecognized token at '{}'"
166- error_collector.add(CompilerError(descrip.format(chunk)))
166+ raise CompilerError(descrip.format(chunk))
167167
168168 # These match_* functions can safely assume the input token_repr is
169169 # non-empty.

The check that tells the two apart

failpass·tests/test_lexer.py::LexerTests::test_bad_identifier

Check file tests/test_lexer.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 it21a412ca93e953519c286e7b312421d98ad4464d
Broken version dated2017-04-18
Modulelexer
Units changedLexer
Fingerprint9c2c0a15b84015d6
Checked2026-08-18 by goldset/0.1

Every field above is generated by our program. None of it is written by hand.