Page 1 of 1

Extension Syntax Options

Posted: Sat Feb 07, 2015 1:23 am
by netdzynr
Didn't want to hijack another thread, so here's a comment:

It appears that an "if..." statement always needs to be closed with "end if" even when "return" appears in the code.
So for example, the Widget Builder flags this as an error:

if mTheme is "ios-8" then return 9

It would be nice if the language parsing would accept the above for more concise code.

Re: Extension Syntax Options

Posted: Mon Feb 09, 2015 10:39 am
by benjibeaumont
Hi Netdzynr,

Thanks for your post and making it a new thread. As you say, it's good to discuss each issue separately. At the moment you are correct, the syntax for if/the/else if/else/return is fixed to the

Code: Select all

if ... then
   # do something
end if
We do intend to extend out what forms of "if" the compiler will accept but for now our focus has been on to core functionality.

Warm regards,


Re: Extension Syntax Options

Posted: Mon Feb 09, 2015 4:52 pm
by Mikey
Second the request: single-line if's would be good, even without a return.