Rust: fix ArrayRepeatExpr control flow

This commit is contained in:
Paolo Tranquilli
2025-06-17 11:48:29 +02:00
parent 6ec89c1ba1
commit 69cdef7797

View File

@@ -204,10 +204,18 @@ class TypeReprTree extends LeafTree instanceof TypeRepr { }
* `LetExpr`s.
*/
module ExprTrees {
class ArrayExprTree extends StandardPostOrderTree, ArrayExpr {
class ArrayListExprTree extends StandardPostOrderTree, ArrayListExpr {
override AstNode getChildNode(int i) { result = this.getExpr(i) }
}
class ArrayRepeatExprTree extends StandardPostOrderTree, ArrayRepeatExpr {
override AstNode getChildNode(int i) {
i = 0 and result = this.getRepeatOperand()
or
i = 1 and result = this.getRepeatLength()
}
}
class AsmExprTree extends LeafTree instanceof AsmExpr { }
class AwaitExprTree extends StandardPostOrderTree instanceof AwaitExpr {