Whole file

terryyin/lizard

The author described this change as fix the swift 'optional' question mark. It counts as a record because the check below fails on the code as it stood at 2823730ab and passes on 714fefb65, with nothing else changed between the two runs.

Fix saved2016-03-31
Sharing licenceMIT · LICENSE.txt
Change size+8 0

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

fix the swift 'optional' question mark

The change

1616 super(SwiftReader, self).__init__(context)
1717 self.parallel_states = [SwiftStates(context)]
1818
19+ @staticmethod
20+ def generate_tokens(source_code, _=""):
21+ return CodeReader.generate_tokens(
22+ source_code,
23+ r"|\w+\?" +
24+ r"|\w+\!" +
25+ _)
26+
1927
2028 class SwiftStates(CodeStateMachine): # pylint: disable=R0903
2129 def _state_global(self, token):

The check that tells the two apart

failpass·test/testSwift.py::Test_parser_for_Swift::test_optional

Check file test/testSwift.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 it2823730ab1cab2e1efc9c9292e3292a8b5b10494
Broken version dated2016-03-26
Modulelizard_languages.swift
Units changedSwiftReader
Fingerprintf132124aff93da72
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