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

[RFC FS-1132] Interpolated strings syntax with multiple dollar signs #14640

Merged
merged 26 commits into from Apr 27, 2023

Conversation

abonie
Copy link
Member

@abonie abonie commented Jan 21, 2023

Implements this RFC.

It is still WIP, my to do list:

  • Correct syntax highlighting for format specifiers (using % before interpolation holes)
  • Make code easier to understand (mostly lex.fsl)
  • Ensure error messages and error ranges are correct
  • Add more tests if necessary
  • Decide on syntax highlighting behavior in VS for when number of $s exceeds what can be encoded
  • Make brace matching work in VS
  • Put changes under lang version flag
  • Fix a bug with syntax highlighting in nested interpolated strings
  • Test for units of measure (?) edit: does not seem relevant, no special interaction with UoM

@abonie abonie force-pushed the poc_improved_interpolation branch 2 times, most recently from dcd9f6b to c9d5774 Compare January 23, 2023 13:43
@abonie abonie force-pushed the poc_improved_interpolation branch 10 times, most recently from 5cdd52e to c7607ae Compare February 24, 2023 11:26
@abonie abonie force-pushed the poc_improved_interpolation branch 17 times, most recently from 96be6fc to 969ae80 Compare March 3, 2023 14:17
Adam Boniecki added 20 commits April 27, 2023 12:08
Replace enum<..>(..) usage in lex.fsl

Use F.A ||| F.B instead of enum<F>(some int literal) in lex.fsl
Make brace matching work for interpolated strings with many braces. Adds
one tests, but perhaps more tests would be good.
Refactor to keep the changes mostly contained into a new lexer rule.
This makes it less likely to cause regression in regular interpolated
strings and easier to put the feature behind a language version check,
at a cost of some boiler-plate.
Replace call to args.diagnosticsLogger.ErrorR in lex.fsl
@abonie abonie force-pushed the poc_improved_interpolation branch from ed3cc38 to 503e5e2 Compare April 27, 2023 10:09
Adam Boniecki added 2 commits April 27, 2023 16:06
Fix some names and remove unnecessary code
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

5 participants