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

Add YAML like multiline strings #22

Closed
sam701 opened this issue Nov 4, 2020 · 1 comment
Closed

Add YAML like multiline strings #22

sam701 opened this issue Nov 4, 2020 · 1 comment
Labels
new feature New feature or request new function

Comments

@sam701
Copy link
Owner

sam701 commented Nov 4, 2020

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 sam701 added the new feature New feature or request label Nov 4, 2020
@sam701
Copy link
Owner Author

sam701 commented Dec 9, 2020

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature New feature or request new function
Projects
None yet
Development

No branches or pull requests

1 participant