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

[C#] support class definitions without a body #4120

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

keith-hall
Copy link
Collaborator

@keith-hall keith-hall commented Dec 26, 2024

fixes #4119

plus converts some anonymous contexts into named contexts

- include: terminator
- match: (?=\S)
pop: true
pop: 1
Copy link
Collaborator

Choose a reason for hiding this comment

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

Not important, but you use pop: true for the rest of the commit (except the pop: 2).

/// ^^^^^^^^^^^^^^^^^^^^^^^ meta.class.cs
/// ^ punctuation.separator.type.cs
/// ^^^^^^^^^ entity.other.inherited-class.cs
/// ^^^^^^^^^^ meta.function-call.cs meta.group.cs
Copy link
Collaborator

Choose a reason for hiding this comment

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

meta.function-call feels off somehow in combination with inherited-class.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

But logically we want it scoped like a normal function call I believe, a constructor is just a special type of function 🙂 I think other constructor calls are like that, though I'm not at a computer to check right now. Like new SomeClass("this is a constructor call")

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.

[C#] Primary constructors on raw classes without a body
3 participants