Re: more help with an AST

2017-07-17 Thread Ed Clark
Hi Jochen, Did my info provide any clues? Is there anything else I can provide to help find where I'm going wrong? Thanks, Ed On 07/12/2017 07:30 AM, Ed Clark wrote: Hi Jochen, Thanks for getting back to me. Responses inline. On 07/12/2017 02:02 AM, Jochen Theodorou wrote: On 11.07.2017

Re: foo() || return false ?

2017-07-17 Thread J. David Beutel
I guess OP wants to do: if (!doSomething()) { return false } I don't know any groovy way to do that, though. On 2017-07-17 15:21 , John Wagenleitner wrote: Since the `||` operator expects an expression a return statement is not valid there. If the goal is to call the method `doSomething()

Re: foo() || return false ?

2017-07-17 Thread John Wagenleitner
Since the `||` operator expects an expression a return statement is not valid there. If the goal is to call the method `doSomething()` and then return false, then both can be put on separate lines or a semicolon can be used to separate the statements to keep it a one-liner, e.g., `doSomething(); r

Re: foo() || return false ?

2017-07-17 Thread Guy Matz
Thanks so much for the reply! I'm not trying to do this, though: || false I'm trying to do this: || return false Is there a more groovy way? Thanks!! On Mon, Jul 17, 2017 at 5:06 PM, John Wagenleitner < john.wagenleit...@gmail.com> wrote: > That is not a valid start of an expression which is

Re: foo() || return false ?

2017-07-17 Thread John Wagenleitner
That is not a valid start of an expression which is expected for the binary expression (expr || expr) so that's why it wont compile. I am not familiar with Scriptler and it is hard to tell without some more context, but how about just: doSomething() You can simplify by dropping the `|| false`. I

foo() || return false ?

2017-07-17 Thread Guy Matz
Hello! I'm trying to do the following in scriptler (Jenkins), but I can't get this to work: doSomething() || return false This fails in scripler with: Execution of script [promoteBuild.groovy] failed - org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed: Script1.groovy: