groovy-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Sun <realblue...@hotmail.com>
Subject Negative relational operators for Groovy 3
Date Fri, 18 Nov 2016 12:45:19 GMT
Hi all,

      The new parser(Parrot) supports negative relational operators now,
which is proposed by Guillaume Laforge :)

      Here are some example
codes(https://github.com/danielsun1106/groovy-parser/blob/negativeRelationalOperators/src/test/resources/core/NegativeRelationalOperators_01x.groovy):

assert 'a' instanceof String
assert 'a' !instanceof Integer
assert 1 <= 2
assert 2 !<= 1
assert 2 >= 1
assert 1 !>= 2
assert 1 < 2
assert 2 !< 1
assert 2 > 1
assert 1 !> 2
assert 1 in [1, 2]
assert 3 !in [1, 2]

      The static compilation example codes can be found at
https://github.com/danielsun1106/groovy-parser/blob/negativeRelationalOperators/src/test/resources/core/NegativeRelationalOperators_02x.groovy

       Any thoughts?

Cheers,
Daniel.Sun



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

Mime
View raw message