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

Stop automatic syntax tests missing gaps (#398) #404

Merged
merged 2 commits into from
Feb 16, 2025

Conversation

camila314
Copy link
Contributor

@camila314 camila314 commented Feb 10, 2025

Fixes #398
Old Version (incorrectly assumes the space has numerical scopes):

    (123 456)
/*  ^^^^^^^^^ meta.group.c-2 */
/*  ^ punctuation.section.group.begin */
/*   ^^^^^^^ meta.number.integer.decimal.c-2 constant.numeric.value.c-2 */
/*          ^ punctuation.section.group.end */```

New Version (correctly excludes space from numerical scopes):

    (123 456)
/*  ^^^^^^^^^ meta.group.c-2 */
/*  ^ punctuation.section.group.begin */
/*   ^^^ meta.number.integer.decimal.c-2 constant.numeric.value.c-2 */
/*       ^^^ meta.number.integer.decimal.c-2 constant.numeric.value.c-2 */
/*          ^ punctuation.section.group.end */

Simply checks if the previous region's end matches with the new region's beginning when inserting into a ScopeTreeNode.

@michaelblyons
Copy link

michaelblyons commented Feb 10, 2025

I also recommend adding "Fixes #398” to the OP body text, since GitHub recognizes certain specific patterns as formal links between an issue and a PR.

Also consider changing the title to something like "Fix automatic syntax assertions filling gaps" or "Stop automatic syntax tests missing gaps". I think the way it is now it sounds backwards to me.

@camila314 camila314 changed the title Fix auto-generated syntaxes not filling gaps (#398) Stop automatic syntax tests missing gaps (#398) Feb 10, 2025
Copy link
Member

@FichteFoll FichteFoll left a comment

Choose a reason for hiding this comment

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

Thanks for taking a look at this issue and fixing it.

@FichteFoll FichteFoll merged commit 2c5b1b0 into SublimeText:master Feb 16, 2025
1 check passed
@FichteFoll FichteFoll added this to the 3.6.1 milestone Feb 16, 2025
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.

Auto generated syntax tests shouldn't fill the gaps
4 participants