You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@groovy.apache.org by "Daniel.Sun" <su...@apache.org> on 2018/03/30 13:03:42 UTC

About triple quoted string

Hi all,

    The old parser does not support code like '''str='abc'''' and
"""str="abc"""" and goes wrong, but the new parser Parrot supports them now.
The improvement conforms to "Least Surprise" principle IMO.

    Any thoughts?


Cheers,
Daniel.Sun




https://github.com/apache/groovy/commit/7e7b508c02bf35e72fca1efcb7cc0d8a4f25038a



--
Sent from: http://groovy.329449.n5.nabble.com/Groovy-Dev-f372993.html

Re: About triple quoted string

Posted by Jochen Theodorou <bl...@gmx.org>.
On 30.03.2018 15:03, Daniel.Sun wrote:
> Hi all,
> 
>      The old parser does not support code like '''str='abc'''' and
> """str="abc"""" and goes wrong, but the new parser Parrot supports them now.
> The improvement conforms to "Least Surprise" principle IMO.
> 
>      Any thoughts?

nice

bye Jochen

Re: About triple quoted string

Posted by "Daniel.Sun" <su...@apache.org>.
Hi mg,

    Both `"""` and `'''` work ;-)

Cheers,
Daniel.Sun




--
Sent from: http://groovy.329449.n5.nabble.com/Groovy-Dev-f372993.html

Re: About triple quoted string

Posted by mg <mg...@arscreat.com>.
Unless one of the EOG* sees a problem with that, that would be a helpful improvement in my case, since I have occasionally run into that in my SQL generator (I assume it also works for double quotes, Daniel ?) :-)mg

*Elders of Groovy
-------- Ursprüngliche Nachricht --------Von: Paul King <pa...@asert.com.au> Datum: 30.03.18  16:03  (GMT+01:00) An: dev@groovy.apache.org Betreff: Re: About triple quoted string 
See also:
https://issues.apache.org/jira/browse/GROOVY-8524


On Fri, Mar 30, 2018 at 11:03 PM, Daniel.Sun <su...@apache.org> wrote:
Hi all,



    The old parser does not support code like '''str='abc'''' and

"""str="abc"""" and goes wrong, but the new parser Parrot supports them now.

The improvement conforms to "Least Surprise" principle IMO.



    Any thoughts?





Cheers,

Daniel.Sun









https://github.com/apache/groovy/commit/7e7b508c02bf35e72fca1efcb7cc0d8a4f25038a







--

Sent from: http://groovy.329449.n5.nabble.com/Groovy-Dev-f372993.html




Re: About triple quoted string

Posted by Paul King <pa...@asert.com.au>.
See also:
https://issues.apache.org/jira/browse/GROOVY-8524


On Fri, Mar 30, 2018 at 11:03 PM, Daniel.Sun <su...@apache.org> wrote:

> Hi all,
>
>     The old parser does not support code like '''str='abc'''' and
> """str="abc"""" and goes wrong, but the new parser Parrot supports them
> now.
> The improvement conforms to "Least Surprise" principle IMO.
>
>     Any thoughts?
>
>
> Cheers,
> Daniel.Sun
>
>
>
>
> https://github.com/apache/groovy/commit/7e7b508c02bf35e72fca1efcb7cc0d
> 8a4f25038a
>
>
>
> --
> Sent from: http://groovy.329449.n5.nabble.com/Groovy-Dev-f372993.html
>