You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am not sure if we should add a special syntax for strings with interpolation (like the s prefix in the example above) or just allow interpolation in every string (and use \$ to write a real dollar sign).
We should also add a syntax for multiline strings, like:
let s = """This is a
string with
several lines"""
This thread is open for suggestions and discussion.
The text was updated successfully, but these errors were encountered:
I don't know how to test apart from running make_for_userdir, reload and build in Visual studio code.
I don't know how to test the language server so I can see that my multi line string is recognized as a string in Visual studio code.
Instead of building the compiler, I would suggest you write unit tests instead, which you can run in your IDE. Then you can go from there to see what errors you have to address. Tests will be required anyway for the PR to be accepted.
Otherwise, you seem to be on the right path, you need to add an antlr rule (perhaps backticks would be better than """).
Then probably the easiest way would be to transform the special multiline string into a concatenation of regular strings with line breaks added.
Regarding Visual Studio Code, the syntax highlighting is defined in the extension's source repository.
Add a nicer way to construct strings.
So instead of
we could write:
I am not sure if we should add a special syntax for strings with interpolation (like the
s
prefix in the example above) or just allow interpolation in every string (and use\$
to write a real dollar sign).We should also add a syntax for multiline strings, like:
This thread is open for suggestions and discussion.
The text was updated successfully, but these errors were encountered: