groovy-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul King <pa...@asert.com.au>
Subject Re: About the groovy code style
Date Wed, 04 Jul 2018 18:40:17 GMT
Comment inline.

On Tue, Jul 3, 2018 at 10:31 PM Jochen Theodorou <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