Skip to content

Add top-level member pattern #107

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

Merged
merged 1 commit into from
Apr 8, 2025

Conversation

milesziemer
Copy link
Contributor

Adds a grammar pattern at the top level for members. While members at the top level aren't valid syntax, having a pattern for them means we can have syntax highlighting in rendered hover content for members.

Before:
Screenshot 2025-04-07 at 3 50 05 PM

After:
Screenshot 2025-04-07 at 3 48 02 PM

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Adds a grammar pattern at the top level for members. While members at
the top level aren't valid syntax, having a pattern for them means we
can have syntax highlighting in rendered hover content for members. See
attached image.
@milesziemer milesziemer requested a review from a team as a code owner April 7, 2025 19:51
@milesziemer milesziemer requested review from sugmanue and joewyz and removed request for sugmanue April 7, 2025 19:51
@JordonPhillips
Copy link
Contributor

What happens if you write a top level member?

@milesziemer
Copy link
Contributor Author

What happens if you write a top level member?

@JordonPhillips This only effects syntax highlighting, so it'll be highlighted, but everything else will work as it currently does. You'll get an error diagnostic, and you won't get erroneous completions suggesting a top level member

@milesziemer milesziemer merged commit acfd288 into smithy-lang:main Apr 8, 2025
1 check passed
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