Re: Assignment Arithmetic operators

Paul King <[email protected]>
Newsgroups gmane.comp.lang.groovy.devel
Message-ID <CAMbkE7TPVHB_gPPE=oyFkjUEJXRc0kUX=azw5XEJxWjC_9bzUQ@mail.gmail.com>
On Tue, Mar 10, 2026 at 9:47 AM Per Nyfelt <[email protected]> wrote:

> Btw: PLUS_ASSIGN would be clearer than ADD_ASSIGN i think
>
> Best regards,
> Per
>

Just commenting on the one above line. For the method we'd use a name like
plusAssign().
ADD_ASSIGN (and similar names) is what is in the Java Antlr4 GRAMMAR file:

https://github.com/antlr/grammars-v4/blob/master/java/java8/Java8Lexer.g4#L290-L300

As that grammar gets updated for later Java versions syntax, it is easier
to follow suit (when we want) if we don't have to redo such renames. It is
really only at the "parser edge" that it surfaces. So something we very
rarely deal with and Groovy users should never have to deal with.

Cheers, Paul.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.