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
feat: dollar-quoted strings support #772
Conversation
Pull Request Test Coverage Report for Build 3799814922
💛 - Coveralls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @vasilev-alex
The basic idea looks good to me. I think with some tests it would be 👍
Marking as draft to signify it is waiting on tests -- please mark as ready to review when it is |
6f292b4
to
5dd6e3e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @vasilev-alex -- this is looking close
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome -- thank you @vasilev-alex
if prev == Some('$') { | ||
if ch == '$' { | ||
chars.next(); | ||
is_terminated = true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
tag: None, | ||
value: "Foo$Bar".into(), | ||
})), | ||
alias: Ident { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Previously, there was the
DoubleDollarQuoting
token, and it was used only in the context of functions. But technically, dollar-quoting is another way to present strings.e.g.
That's why I think it's reasonable to introduce the
DollarQuotedString
token, which can hold such string values and their optional tag names.I have not added any tests yet but will do it if otherwise, it looks ok.
Closes #698