Whole file

terryyin/lizard

The author described this change as fix: Function nesting. It counts as a record because the check below fails on the code as it stood at 9bd29705f and passes on 42bb5335c, with nothing else changed between the two runs.

Fix saved2025-09-05
Sharing licenceMIT · LICENSE.txt
Change size+1 1

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

fix: Function nesting

The change

112112 def _state_global(self, token):
113113 token_upper = token.upper()
114114
115- if token_upper in StReader._functions:
115+ if token_upper in StReader._functions and self.context.current_function.top_nesting_level < 0:
116116 self._state = self._function_name
117117 elif token_upper in StReader._blocks:
118118 self.context.add_bare_nesting()

The check that tells the two apart

failpass·test/test_languages/testSt.py::Test_st_lizard::test_nested_actions

Check file test/test_languages/testSt.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 it9bd29705f945e25c65f7a8da0f03288f0bd36444
Broken version dated2025-09-05
Modulelizard_languages.st
Units changedStStates
Fingerprinte329345ab6bd4702
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