-
Notifications
You must be signed in to change notification settings - Fork 44
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 #453
Comments
I think what I ended up doing was allowing line breaks before any primary
expression, a primary expression being an expression that can't be broken
down into sub-expressions, eg: literals, identifiers and misc other stuff.
I'll double-check in the weekend, but if so this should definitely be added
to docs.
…On Wed, Jan 16, 2019 at 7:17 AM Danilo Krahn ***@***.***> wrote:
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?
Did I miss any supported line-continuation characters/operators?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#453>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/ADU3QtvJVYmHO_iFTW5KKE0IhEgJiSEwks5vDhslgaJpZM4aBhhr>
.
|
👍 |
Any news on that topic? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The documentation in misc.md says:
Monkey2 supports line breaks at many more things, for example:
Would it be okay to add this to the documentation? (I could do it)
Did I miss any supported line-continuation characters/operators?
The text was updated successfully, but these errors were encountered: