Am 22.10.2018 um 22:34 schrieb Guillaume Laforge:
Damn, MG will tell me again I'm reacting negatively to Daniel's ideas
but... :-)
No, no - it's not a knee jerk reaction. In this case I see both points,
and am torn on what I would prefer...
(Generally speaking, while having a "regex
Hi Jochen,
If the string is invalid, lexer can detect the error efficiently.
In addition, editing one line version of string will not impact
lexer to recognize the remaining source code, which is very important for
the performance of source code highlighter.
Cheers,
Daniel.Sun
-
On 23.10.2018 03:01, Daniel Sun wrote:
Hi Guillaume,
Groovy has multiline version for regex already, i.e. `$/.../$`, so
`/.../` also supporting is redundant IMHO ;-)
Similarly, `"..."` and `'...'` have their multline versions, i.e.
`'''...'''` and `"""..."""`, so they
Changing regex syntax is a breaking change that comes without compiler
warnings.
Dierk
sent from:mobile
> Am 22.10.2018 um 22:34 schrieb Guillaume Laforge :
>
> Damn, MG will tell me again I'm reacting negatively to Daniel's ideas but...
> :-)
>
> Interestingly, the multiline support in
It would be nice to simplify Strings especially in light of Raw String
literals being added to Java which I suspect we will want to support at
some stage. The thing is that slashy and dollar slashy strings aren't the
same in various ways not just line endings. Changing them to be more the
same (so
Hi Guillaume,
Groovy has multiline version for regex already, i.e. `$/.../$`, so
`/.../` also supporting is redundant IMHO ;-)
Similarly, `"..."` and `'...'` have their multline versions, i.e.
`'''...'''` and `"""..."""`, so they just support single line.
P.S. `"..."`
Damn, MG will tell me again I'm reacting negatively to Daniel's ideas
but... :-)
Interestingly, the multiline support in regex was kind of a highlight of
Groovy's support of regexes as they allowed making more readable regular
expressions.
If you have it, have a look at some of the examples in
Hi all,
Groovy regex literal allows new lines, i.e. 0D0A, which introduces
some ambiguity and breaks consistency in syntax. Let's have a look at some
examples:
1) Ambiguity example:
```
m /ab
c/ d
```
This can be parsed as a command chain expression or parsed as two arithmetic