Skip to content

Conversation

@kubouch
Copy link
Contributor

@kubouch kubouch commented Jan 8, 2025

Adds lexing of string interpolations, both single- and double-quoted. It required some manual parsing, which took a few tries, but it's not too bad and can serve as a proof-of-concept if we need some more manual lexing in the Logos lexer.

One limitation is that the string intepolations cannot host the same types of quotes, for example $"foo("bar")baz" is not allowed, but in Nushell it is allowed. It might be possible to add it, but would require more hassle, so I left it out for now as it's not a severe limitation.

It also adds a LexError for reporting lexing errors. Now it is used only in string interpolation, but it can be expanded in the future.

@kubouch kubouch merged commit 8255e9e into nushell:main Jan 10, 2025
4 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.

1 participant