groovy-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Sun <realblue...@hotmail.com>
Subject Re: Elvis Assignment for Groovy 3
Date Sat, 03 Dec 2016 16:19:30 GMT
My pleasure ;)

Cheers,
Daniel.Sun




在 "Marcin Erdmann [via Groovy]" <ml-node+s329449n5737109h37@n5.nabble.com>,2016年12月3日
下午5:01写道:

Awesome, thanks for implementing it Daniel.

On Sat, Dec 3, 2016 at 7:59 AM, Daniel Sun <[hidden email]> wrote:
Hi all,

       The new parser "Parrot" supports Elvis Assignment(i.e.  ?=) now. Here
are some examples:

    def a = 2
    a ?= 1
    assert a == 2

    a = null
    a ?= 1
    assert a == 1

    a = null
    a ?= a ?= 1
    assert a == 1

P.S. supports static compilation as well.

Cheers,
Daniel.Sun




--
View this message in context: http://groovy.329449.n5.nabble.com/Elvis-Assignment-for-Groovy-3-tp5737108.html
Sent from the Groovy Dev mailing list archive at Nabble.com.



________________________________
If you reply to this email, your message will be added to the discussion below:
http://groovy.329449.n5.nabble.com/Elvis-Assignment-for-Groovy-3-tp5737108p5737109.html
To unsubscribe from Elvis Assignment for Groovy 3, click here<http://groovy.329449.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5737108&code=cmVhbGJsdWVzdW5AaG90bWFpbC5jb218NTczNzEwOHwxMTQ2MjE4MjI1>.
NAML<http://groovy.329449.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>




--
View this message in context: http://groovy.329449.n5.nabble.com/Elvis-Assignment-for-Groovy-3-tp5737108p5737114.html
Sent from the Groovy Dev mailing list archive at Nabble.com.
Mime
View raw message