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

Implement DEP 12, string literals supporting Rectangle Rule #1534

Merged
merged 1 commit into from
Oct 1, 2023

Conversation

cgay
Copy link
Member

@cgay cgay commented Sep 24, 2023

See https://opendylan.org/proposals/dep-0012-string-literals.html#the-rectangle-rule for details.

This implements everything except for the ability to use three or more double quotes to start/end the multi-line string. Only exactly """ may be used at this point.

// When this is called `string` is known to contain at least one literal newline
// character, the EOL sequence has already been canonicalized to just '\n', escape
// sequences have been processed, and the start/end delimiters have been removed.
define function trim-multi-line-prefix
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are probably efficiency improvements that could be made to this function, but I guess it won't be a bottleneck in compiling most programs so it should be fine.

@cgay cgay merged commit f4bf7f1 into dylan-lang:master Oct 1, 2023
3 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.

2 participants