Hi guys, I’m working with elixit AST’s, to create some custom checks in credo, and I was wondering if there is a way to capture 2 nodes by pattern matching in the params of the traverse function? I saw that always they use pattern matching in the AST param they always get a triplet of a node:
but I was trying to pattern match 2 nodes to validate if the second nodes comes exactly after the first one. looking to this ast:
it seems that all the code is inside the list of arguments of the triplet of the :do block, and I tryied to pattern pmatch like this :
[{:@, _, _}, {:def, _, arguments}] = ast but the clause is never matched.
thanks in advice for any help.