Skip to content

Add top-level member pattern#107

Merged
milesziemer merged 1 commit into
smithy-lang:mainfrom
milesziemer:member-grammar
Apr 8, 2025
Merged

Add top-level member pattern#107
milesziemer merged 1 commit into
smithy-lang:mainfrom
milesziemer:member-grammar

Conversation

@milesziemer
Copy link
Copy Markdown
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 joewyz and sugmanue and removed request for sugmanue April 7, 2025 19:51
@JordonPhillips
Copy link
Copy Markdown
Contributor

What happens if you write a top level member?

@milesziemer
Copy link
Copy Markdown
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