Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't pass redundant label names to table_width and list_start #1160

Merged
merged 1 commit into from
Dec 27, 2024

Conversation

Rangi42
Copy link
Member

@Rangi42 Rangi42 commented Dec 26, 2024

RGBDS 0.9.0 introduces the string symbols . for the current global label scope and .. for the current qualified local label scope. These allow us to get the "current label" in the table_width and list_start macros without having to redundantly pass it.

(The reason we want the current label at all, instead of always generating a new local label with \@ to mark the start of a table or list, is so that when the size is wrong, the error message will mention the name of the thing that's wrong instead of some obscure autogenerated label.)

If this looks good, I'll do the same in red+yellow+gold.

@Rangi42
Copy link
Member Author

Rangi42 commented Dec 26, 2024

These commands were very helpful:

git grep -l table_width | xargs sed -i -E 's/^(.)table_width ([^,]+), [A-Za-z0-9_.]+$/\1table_width \2/g'
git grep -l list_start | xargs sed -i -E 's/^(.)list_start [A-Za-z0-9_.]+$/\1list_start/g'

@Rangi42
Copy link
Member Author

Rangi42 commented Dec 27, 2024

Okay, @dannye and @mid-kid also approved :)

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