Skip to content

Comments

Scanner fix#696

Merged
neworderofjamie merged 2 commits intomasterfrom
scanner_fix
Jul 16, 2025
Merged

Scanner fix#696
neworderofjamie merged 2 commits intomasterfrom
scanner_fix

Conversation

@neworderofjamie
Copy link
Contributor

The scanner is the bit of the transpiler which turns a code string into a sequence of token objects (which is a much nicer thing to work with). It's pretty much a C++ port of the one from https://craftinginterpreters.com/scanning.html but I failed to implement scanning of string literals properly. This means un-terminated strings would crash the scanner. This PR adds a unit test and fixes the issue.

Fixes #692

@neworderofjamie neworderofjamie added this to the GeNN 5.3.0 milestone Jul 9, 2025
@neworderofjamie neworderofjamie requested a review from tnowotny July 9, 2025 14:44
Copy link
Member

@tnowotny tnowotny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Such a simple thing ... fix looks good.

@neworderofjamie neworderofjamie merged commit bad2813 into master Jul 16, 2025
3 checks passed
@neworderofjamie neworderofjamie deleted the scanner_fix branch July 16, 2025 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Badly formed code strings can crash scanner

2 participants