Automatically concatenate adjacent string literals together into a single string at compile time.
For example
"hello " "world"
Should be treated as if it were "hello world"
We can potentially do this directly in the tokenizer. It's probably acceptable for the source file location to be set to the union of the two (or more) string extents - e.g. we don't need to be able to report errors against the individual string segments, or leave a gap in the red underlining where there are gaps between the adjacent concatenated strings.
We also could insert newlines into the concatenated string where joined strings are on separate source lines. I'm not convinced this is a good idea though, and on balance would prefer to have some separate syntax for multi-line string literals.
Automatically concatenate adjacent string literals together into a single string at compile time.
For example
Should be treated as if it were
"hello world"
We can potentially do this directly in the tokenizer. It's probably acceptable for the source file location to be set to the union of the two (or more) string extents - e.g. we don't need to be able to report errors against the individual string segments, or leave a gap in the red underlining where there are gaps between the adjacent concatenated strings.
We also could insert newlines into the concatenated string where joined strings are on separate source lines. I'm not convinced this is a good idea though, and on balance would prefer to have some separate syntax for multi-line string literals.