Skip to content

Conversation

@mizdebsk
Copy link
Member

Refactor and simplify parsing logic for character and string literals within find_token(). Merge redundant conditional branches, reduce unnecessary control flow, and replace multi-line loops with more concise equivalents.

Refactor and simplify parsing logic for character and string literals
within find_token().  Merge redundant conditional branches, reduce
unnecessary control flow, and replace multi-line loops with more
concise equivalents.
@mizdebsk
Copy link
Member Author

This is an alternative to #28 that not only fixes static analysis warnings, but also simplifies code logic.

@mkoncek
Copy link
Member

mkoncek commented Jul 23, 2025

When looking at this, I realize why I wrote it like I did. I find the verbose code actually more readable. It almost reads like a sentence. I don't like compressing more operations into a single line.
An optimizing compiler has no problems deduplicating things like substr.
So I am not in favor of this change.

@mizdebsk
Copy link
Member Author

Feel free to close it in favor of #28, which preserves readability.

@mkoncek mkoncek closed this Jul 23, 2025
@mizdebsk mizdebsk deleted the pr/33 branch July 23, 2025 15:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants