Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
是否可以or在函数声明中使用?喜欢:
or
functionDecl(hasName("a") or hasName("b"))
或者我们必须使用addMatcher添加更多匹配器来获得相同的结果?
addMatcher
有几种缩小匹配器形成其他匹配器的逻辑组合:anyOf类似于“或”,allOf可以实现“与”,unless类似于“非”。您的示例可能看起来像
anyOf
allOf
unless
functionDecl( anyOf( hasName("a"), hasName("b") ))