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

Allow splitting string literals over multiple lines #7292

Closed
axic opened this issue Aug 22, 2019 · 1 comment · Fixed by #7524
Closed

Allow splitting string literals over multiple lines #7292

axic opened this issue Aug 22, 2019 · 1 comment · Fixed by #7524
Labels
language design :rage4: Any changes to the language, e.g. new features

Comments

@axic
Copy link
Member

axic commented Aug 22, 2019

Many languages support splitting string literals overs multiple lines. Some require a special token between them.

I'd propose that parsing (hex) string literals would allow " as the next token and start concatenating the literals. Any whitespace, including new lines, would be allowed between the two " tokens.

E.g. bytes tmp = hex"00112233" "44556677"; would be equivalent to hex"0011223344556677".

@axic axic added the language design :rage4: Any changes to the language, e.g. new features label Aug 22, 2019
@chriseth
Copy link
Contributor

Sounds good! I would support that for all kinds of strings.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
language design :rage4: Any changes to the language, e.g. new features
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

2 participants