mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
Rust: distinguish [a, b] from [a; b]
This splits the `ArrayExpr` class into `ArrayListExpr` and `ArrayRepeatExpr`. This uses the `synth.from_class` machinery to integrate seamlessly into the generated code, by hiding the extracted `ArrayExpr` behind an internal class and replacing it with a hierarchy of those two classes under a new `ArrayExpr` class.
This commit is contained in:
3
rust/schema/ast.py
generated
3
rust/schema/ast.py
generated
@@ -38,9 +38,10 @@ class Abi(AstNode):
|
||||
class ArgList(AstNode):
|
||||
args: list["Expr"] | child
|
||||
|
||||
class ArrayExpr(Expr):
|
||||
class ArrayExprInternal(Expr):
|
||||
attrs: list["Attr"] | child
|
||||
exprs: list["Expr"] | child
|
||||
is_semicolon: predicate
|
||||
|
||||
class ArrayType(TypeRef):
|
||||
const_arg: optional["ConstArg"] | child
|
||||
|
||||
Reference in New Issue
Block a user