groovy-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From MG <mg...@arscreat.com>
Subject Re: About the groovy code style
Date Wed, 04 Jul 2018 21:18:04 GMT
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 from
    here to Baghdad (not only "Danil"'s) ?-)

Cheers,
mg


On 04.07.2018 20:40, Paul King wrote:
>
> Comment inline.
>
> On Tue, Jul 3, 2018 at 10:31 PM Jochen Theodorou <blackdrag@gmx.org 
> <mailto:blackdrag@gmx.org>> 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 thoughts?
>     >
>     > 1) import statement (
>     https://issues.apache.org/jira/browse/GROOVY-8642 )
>     > ```
>     > import java.
>     > lang.
>     > Object
>     > ```
>     >
>     > 2) prefix operator (
>     https://issues.apache.org/jira/browse/GROOVY-8650 )
>     > ```
>     > def c = --
>     > 1
>
>     I do not need these.. but since I know Danil is doing special things
>     with DSL, maybe we should first ask him if he needs that and why
>
>
> Jochen, even though you say you "do not need these", the real question 
> is what set of rules are you replacing the existing conceptual rule with?
>
> 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 double quoted strings to span multiple lines but the list is short.
>
> What are your new rules and new list of exceptions?
>
> We shouldn't be tied down by our existing set of rules but we want to 
> keep them simple for our users so they all don't need to be grammar 
> experts to use the language.
>
> Cheers, Paul.
>
>     bye Jochen
>


Mime
View raw message