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

Docs: line breaks / line continuation #116

Open
Pharmhaus-2 opened this issue Apr 14, 2019 · 0 comments
Open

Docs: line breaks / line continuation #116

Pharmhaus-2 opened this issue Apr 14, 2019 · 0 comments

Comments

@Pharmhaus-2
Copy link

Original Author: D-a-n-i-l-o

The documentation in misc.md says:

Line breaks in code

Lines can currently only be split after ‘[‘, ‘(‘ or ‘,’ tokens.

Monkey2 supports line breaks at many more things, for example:

    Local integer := 1 +
                     2 *
                     3 /
                     4 -
                     5 Mod
                     6

    Local l := "line 1~q"+
               "line 2~q"+
               "line 3~q"+
               "line 4~q"

    Local flag := mojo.app.WindowFlags.Resizable |
                  mojo.app.WindowFlags.HighDPI   |
                  mojo.app.WindowFlags.Center

    If 5 =
           5 Or
                1 <
                    2 And
                          3 >
                              4 Then Print "okay"

Would it be okay to add this to the documentation? (I could do it)

Did I miss any supported line-continuation characters/operators?

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

No branches or pull requests

1 participant