Re: About the groovy code style

2018-07-05 Thread Jochen Theodorou
On 04.07.2018 20:40, Paul King wrote: [...] Existing rule: if the set of tokens parsed when an end of line is reached doesn't make a complete expression/statement, continue reading tokens as if the EOL wasn't there. There are exceptions, e.g. we currently don't allow single quote and single d

Re: About the groovy code style

2018-07-04 Thread MG
Two questions: 1. Jochen says "Danil  is doing special things with DSL", but "Daniil Ovchinnikov" replied regarding IntelliJ Groovy parsing. So is Danil == Daniil ? 2. I neither like nor use these syntax varieties - but wouldn't changing any of that behavior potentially break Groovy DSLs

Re: About the groovy code style

2018-07-04 Thread Paul King
Comment inline. On Tue, Jul 3, 2018 at 10:31 PM Jochen Theodorou wrote: > > > Am 03.07.2018 um 04:44 schrieb Daniel.Sun: > > Hi all, > > > > The following code is supported in the older parser, but I propose > to > > stop supporting the ugly code style in the new Parrot parser. Any > thoug

Re: About the groovy code style

2018-07-04 Thread Daniel.Sun
Hi Daniil, OK. I see. I am not going to support the ugly code style... but I want to know what others think about :-) Cheers, Daniel.Sun - Daniel Sun Apache Groovy committer Blog: http://blog.sunlan.me Twitter: @daniel_sun -- Sent from: http://groovy.329449.n5.nabble.com/Groovy-Users-

Re: About the groovy code style

2018-07-04 Thread Daniil Ovchinnikov
Each introduced change make tooling more complicated. While some constructs become invalid in newer compiler, IntelliJ still has to support all Groovy versions. So in IntelliJ we will continue to parse as in old version, but I’ll have to add error highlighting and tweak formatter for 3.0, unles

Re: About the groovy code style

2018-07-04 Thread Daniel.Sun
Yep. Daniil. - Daniel Sun Apache Groovy committer Blog: http://blog.sunlan.me Twitter: @daniel_sun -- Sent from: http://groovy.329449.n5.nabble.com/Groovy-Users-f329450.html

Re: About the groovy code style

2018-07-04 Thread Daniil Ovchinnikov
You mean me? — Daniil Ovchinnikov JetBrains > On 4 Jul 2018, at 05:39, Daniel.Sun wrote: > > ping Danil :-) > > > > - > Daniel Sun > Apache Groovy committer > Blog: http://blog.sunlan.me > Twitter: @daniel_sun > > -- > Sent from: http://groovy.329449.n5.nabble.com/Groovy-Users-f3

Re: About the groovy code style

2018-07-03 Thread Daniel.Sun
Hi Paul, > def foobar2 = 'foo' > + 'bar2' > > which compiles but gives a runtime error: > MissingMethodException: No signature of method: > java.lang.String.positive() > > > Since + here is the unary plus operator which while seldom used in that > fashion is a valid operator. > > Strangely

Re: About the groovy code style

2018-07-03 Thread Daniel.Sun
ping Danil :-) - Daniel Sun Apache Groovy committer Blog: http://blog.sunlan.me Twitter: @daniel_sun -- Sent from: http://groovy.329449.n5.nabble.com/Groovy-Users-f329450.html

Re: About the groovy code style

2018-07-03 Thread Jochen Theodorou
Am 03.07.2018 um 04:44 schrieb Daniel.Sun: Hi all, The following code is supported in the older parser, but I propose to stop supporting the ugly code style in the new Parrot parser. Any thoughts? 1) import statement ( https://issues.apache.org/jira/browse/GROOVY-8642 ) ``` import java

Re: About the groovy code style

2018-07-02 Thread Paul King
I think it is worth reviewing some of these edge cases but we want to keep the overall conceptual model describing the parser behavior (i.e. parser rules) as simple as possible. Here is my understanding of the rules for the classic parser. Java supports a fluent api style such as: String lowerCit

About the groovy code style

2018-07-02 Thread Daniel.Sun
Hi all, The following code is supported in the older parser, but I propose to stop supporting the ugly code style in the new Parrot parser. Any thoughts? 1) import statement ( https://issues.apache.org/jira/browse/GROOVY-8642 ) ``` import java. lang. Object ``` 2) prefix operator ( https://