Skip to content

Conversation

@Rangi42
Copy link
Contributor

@Rangi42 Rangi42 commented Dec 16, 2020

Fixes #589

@Rangi42
Copy link
Contributor Author

Rangi42 commented Dec 16, 2020

@ISSOtm I know you said you preferred heredoc-like syntax, but this fit neatly into the current lexer without having to add a user-defined token.

@Rangi42 Rangi42 force-pushed the issue589 branch 2 times, most recently from bb9ff7e to 121540a Compare December 16, 2020 17:50
@Rangi42
Copy link
Contributor Author

Rangi42 commented Dec 18, 2020

If this won't be accepted, I can try implementing custom-identifier heredoc-style instead. (Although one thing I like about triple-quotes is that they don't have to be multi-line; for example:

SENTENCE EQUS """One "fish" two "fish" red "fish" blue "fish"."""

vs.

SENTENCE EQUS <<<SEUSS ; arbitrary identifier
One "fish" two "fish" red "fish" blue "fish".
SEUSS ; languages aren't consistent on whether the trailing newline is included (Ruby) or not (Racket)

@aaaaaa123456789
Copy link
Member

As I see it, one does not preclude the other. Both forms of syntax are so unobtrusive with respect to "normal" coding that they can easily coexist.
As for whether the trailing newline should be included or not in a heredoc-like string, I think not including it would be the best idea, simply because it's easy to add an extra newline if needed, but impossible to remove it if not.

@Rangi42 Rangi42 force-pushed the issue589 branch 2 times, most recently from 6230952 to e738315 Compare December 19, 2020 00:39
Copy link
Member

@ISSOtm ISSOtm left a comment

Choose a reason for hiding this comment

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

Above and beyond with the new test cases! 👍

@ISSOtm ISSOtm merged commit 255b8bf into gbdev:master Dec 19, 2020
@Rangi42 Rangi42 deleted the issue589 branch December 19, 2020 17:03
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.

[Feature request] Multi-line string literals

3 participants