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 multiline list literals #35

Open
ghost opened this issue Jun 19, 2013 · 2 comments
Open

Allow multiline list literals #35

ghost opened this issue Jun 19, 2013 · 2 comments

Comments

@ghost
Copy link

ghost commented Jun 19, 2013

Not sure if this is by design or not, but this fails with "Error: Except ']' to close list.":

https://gist.github.com/untothebreach/c16a9899ddccef420aff

@ghost
Copy link
Author

ghost commented Jun 19, 2013

Also, attempting to escape the newlines with a backslash gives "Error: Unknown character ''."

@ghost
Copy link
Author

ghost commented Jun 19, 2013

Ok, after digging a bit, it seems that the newlines after the commas are getting ignored correctly, but the newline after the [ and the newline after the last element in the list (3 in the gist) are not being ignored. In fact, this does work:

do
    val mlist = [ 1,
                  2,
                  3]
    print(mlist) // expect [1, 2, 3]
end

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants