Skip to content

[C#] Bump syntax version, fix pop: true & order#4412

Closed
jrappen wants to merge 1 commit intosublimehq:masterfrom
jrappen:fix-csharp
Closed

[C#] Bump syntax version, fix pop: true & order#4412
jrappen wants to merge 1 commit intosublimehq:masterfrom
jrappen:fix-csharp

Conversation

@jrappen
Copy link
Copy Markdown
Collaborator

@jrappen jrappen commented Dec 10, 2025

This commit:

  • bumps the syntax to version 2
  • replaces pop: true with pop: 1
  • adds section markers
  • changes order of contexts where contexts were not in their section
  • added else-pop (prototype) context

@jrappen

This comment was marked as resolved.

@deathaxe

This comment was marked as outdated.

@jrappen jrappen force-pushed the fix-csharp branch 3 times, most recently from 8bac9fc to e6e572c Compare December 11, 2025 22:05
@jrappen
Copy link
Copy Markdown
Collaborator Author

jrappen commented Dec 11, 2025

Still have to address changes due to https://www.sublimetext.com/docs/syntax.html#compatibility.

@michaelblyons
Copy link
Copy Markdown
Collaborator

Do you want to drop to version 1, merge, and work on v2 later?

@jrappen
Copy link
Copy Markdown
Collaborator Author

jrappen commented Dec 27, 2025

Whatever works for you guys, I'm kinda busy irl.

This commit:

- bumps the syntax to version 2
- replaces `pop: true` with `pop: 1`
- adds section markers
- changes order of contexts where contexts were
  not in their section
@jrappen
Copy link
Copy Markdown
Collaborator Author

jrappen commented Jan 17, 2026

I fixed a few, Michael. I'll try to do the left overs tonight.

/// ^^^^^^^^ meta.class.record
/// ^^^^^^^^^ meta.class.constructor.parameters
/// ^ - meta.class
/// ^ meta.class.record.body punctuation.terminator.statement
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Well, modifying test cases doesn't mean fixing issues. Note that trailing semicolon most likely does not belong to meta.class (especially not meta.class.record.body) and thus syntax needs to be adjusted for the old test to succeed.

@jrappen
Copy link
Copy Markdown
Collaborator Author

jrappen commented Apr 4, 2026

closing, (partially) superseded by #4496

@jrappen jrappen closed this Apr 4, 2026
@jrappen jrappen deleted the fix-csharp branch April 4, 2026 20:48
jrappen pushed a commit that referenced this pull request Apr 4, 2026
This PR moves some contexts around and adds section headers without changing any behavior.

It is a first step towards some refactoring with the goal to apply some more modern structure best practices and split syntax definition into sections for hopefully better overview about which parts belong together.

The idea is to do this in small reviewable steps, instead of a big rewrite, which may land not anytime soon.

It partly supersedes #4412, but with defering breaking changes like version 2 syntax to future PRs.
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.

3 participants