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

string literals with embedded newlines #1624

Open
cgay opened this issue Jul 21, 2024 · 0 comments
Open

string literals with embedded newlines #1624

cgay opened this issue Jul 21, 2024 · 0 comments

Comments

@cgay
Copy link
Member

cgay commented Jul 21, 2024

https://play.opendylan.org/shared/feae26a75c598856

define constant $template =
  """
    format-out("Hello, world!\n");

  """;
Open Dylan 2024.1
...play-6efce37c1178/main.dylan:8.3-51: Serious warning - Invalid multi-line string literal: "each line must begin with the same whitespace that precedes the end delimiter (got "\")", want "  ")"
        ------------------------------------------------
        """;
        ------------------------------------------------

I think the multi-line string literal handling just needs to remove the shared whitespace prefix before handling escape codes.

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

No branches or pull requests

1 participant