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

Fix trait application and empty string parsing #197

Merged
merged 1 commit into from
Feb 13, 2025

Conversation

milesziemer
Copy link
Contributor

#190 fixed trait application parsing for traits like @foo(), making it so the end of the trait doesn't include trailing whitespace. This commit fixes the case for non-empty traits, like @foo(bar: "").

It also fixes parsing of empty strings. Previously the character after the end of the string would be skipped.

I also made TextWithPositions work when there are multiple markers on the same line.

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

smithy-lang#190 fixed
trait application parsing for traits like `@foo()`, making it so the end
of the trait doesn't include trailing whitespace. This commit fixes the
case for non-empty traits, like `@foo(bar: "")`.

It also fixes parsing of empty strings. Previously the character _after_
the end of the string would be skipped.
@milesziemer milesziemer requested a review from a team as a code owner February 13, 2025 22:38
@milesziemer milesziemer requested review from sugmanue and joewyz and removed request for sugmanue February 13, 2025 22:38
@milesziemer milesziemer merged commit 8999cb9 into smithy-lang:main Feb 13, 2025
3 checks 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.

2 participants