在Groovy中,隶属运算符的优先级是多少("in")
In Groovy, what is the precedence of the membership operator ("in")
http://www.groovy-lang.org/operators.html#_operator_precedence 不列出 "in"(成员资格)二元运算符。它的优先级是什么?
我在 Groovy 解析器本身的源代码中找到了答案:https://github.com/groovy/groovy-core/blob/master/src/main/org/codehaus/groovy/antlr/groovy.g#L2337:
( 7) < <= > >= instanceof as in
因此,"in" 运算符与 "instanceof"、"as" 等具有相同的优先级
可以在 groovy 文档中找到答案
http://www.groovy-lang.org/operators.html#_operator_precedence
http://www.groovy-lang.org/operators.html#_operator_precedence 不列出 "in"(成员资格)二元运算符。它的优先级是什么?
我在 Groovy 解析器本身的源代码中找到了答案:https://github.com/groovy/groovy-core/blob/master/src/main/org/codehaus/groovy/antlr/groovy.g#L2337:
( 7) < <= > >= instanceof as in
因此,"in" 运算符与 "instanceof"、"as" 等具有相同的优先级
可以在 groovy 文档中找到答案
http://www.groovy-lang.org/operators.html#_operator_precedence