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

Commits on Apr 27, 2023

  1. POC for improved interpolation

    abonie committed Apr 27, 2023
    Configuration menu
    Copy the full SHA
    09e40d7 View commit details
    Browse the repository at this point in the history
  2. Add new error for too many consecutive braces

    In interpolated triple quoted strings that start with N times $
    character, then can be max 2*N-1 consecutive { or } characters.
    
    New diagnostic is added for this error case.
    abonie committed Apr 27, 2023
    Configuration menu
    Copy the full SHA
    c4e3308 View commit details
    Browse the repository at this point in the history
  3. Handle percent sign characters

    Add new error for too many %
    abonie committed Apr 27, 2023
    Configuration menu
    Copy the full SHA
    295056e View commit details
    Browse the repository at this point in the history
  4. Fix closing braces error

    abonie committed Apr 27, 2023
    Configuration menu
    Copy the full SHA
    4570987 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    c7391a3 View commit details
    Browse the repository at this point in the history
  6. Encode # of $ in interpolated strings

    Using 3 bits
    abonie committed Apr 27, 2023
    Configuration menu
    Copy the full SHA
    821a62e View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    9a47de2 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    ca20665 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    7fd2f50 View commit details
    Browse the repository at this point in the history
  10. Add comments in lex.fsl, fix linter errors

    Replace enum<..>(..) usage in lex.fsl
    
    Use F.A ||| F.B instead of enum<F>(some int literal) in lex.fsl
    abonie committed Apr 27, 2023
    Configuration menu
    Copy the full SHA
    8ebface View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    f80e136 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    e7b6640 View commit details
    Browse the repository at this point in the history
  13. Fix brace matching for many braces

    Make brace matching work for interpolated strings with many braces. Adds
    one tests, but perhaps more tests would be good.
    abonie committed Apr 27, 2023
    Configuration menu
    Copy the full SHA
    50d7423 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    88cce36 View commit details
    Browse the repository at this point in the history
  15. Rename variable

    abonie committed Apr 27, 2023
    Configuration menu
    Copy the full SHA
    92d8c34 View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    6175016 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    50a572e View commit details
    Browse the repository at this point in the history
  18. Extract lexer changes into a new lexer rule

    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.
    abonie committed Apr 27, 2023
    Configuration menu
    Copy the full SHA
    2d13f31 View commit details
    Browse the repository at this point in the history
  19. Configuration menu
    Copy the full SHA
    a6826f6 View commit details
    Browse the repository at this point in the history
  20. Configuration menu
    Copy the full SHA
    63390c3 View commit details
    Browse the repository at this point in the history
  21. Configuration menu
    Copy the full SHA
    1bef0cd View commit details
    Browse the repository at this point in the history
  22. Configuration menu
    Copy the full SHA
    7749a86 View commit details
    Browse the repository at this point in the history
  23. Remove an unnecessary check

    abonie committed Apr 27, 2023
    Configuration menu
    Copy the full SHA
    ef8caee View commit details
    Browse the repository at this point in the history
  24. Use errorR rather than diagnosticsLogger.ErrorR

    Replace call to args.diagnosticsLogger.ErrorR in lex.fsl
    abonie committed Apr 27, 2023
    Configuration menu
    Copy the full SHA
    503e5e2 View commit details
    Browse the repository at this point in the history
  25. Apply code review comments

    Fix some names and remove unnecessary code
    abonie committed Apr 27, 2023
    Configuration menu
    Copy the full SHA
    d33883b View commit details
    Browse the repository at this point in the history
  26. Add more brace matching tests

    abonie committed Apr 27, 2023
    Configuration menu
    Copy the full SHA
    0e5434a View commit details
    Browse the repository at this point in the history