KoryNunn / presh

An immutable interpreted expression language.
MIT License
6 stars 2 forks source link

multiline strings / template literals? #24

Open markwylde opened 3 years ago

markwylde commented 3 years ago

Are you all for implementing multiline strings (or even better, template literals) into presh?

Is that hard to do? Could I do it?

markwylde commented 3 years ago

Okay, just realised you can do:

'hey

hello'

And that outputs heyhello

So it looks like presh does actually support multiline strings.

Is this intended or a side effect?

In that case, you can kinda do interpolation via:

'hey

hello' + variable + 'there'
markwylde commented 3 years ago

Okay another weird problem.

In the example, if you paste in the below, it will error. But if you type the whole thing in manually it will work. Are the newline characters al being accepted?

"hello

there"