sam701 / syconf

A simple configuration language that keeps your config files lean
Apache License 2.0
3 stars 1 forks source link

Add YAML like multiline strings #22

Closed sam701 closed 3 years ago

sam701 commented 3 years ago

It would be helpful to have something like yaml | and > operators.

let a = |"
  abc
  def
"
let b = >'
   abc
   def
'
in
a == "abc
def" and b == "abc def"
sam701 commented 3 years ago

Actually the same could be achieved for example like this

let a = "
  abc
  def
".script()
let b = "
  abc
  def
".oneline()
in
a == "abc
def" and b == "abc def"

This approach does not extend the language syntax but still concise enough.