mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
Rust: Add Callable as a base class of Function and ClosureExpr
This commit is contained in:
@@ -1520,3 +1520,21 @@ class _:
|
||||
todo!()
|
||||
```
|
||||
"""
|
||||
|
||||
class Callable(AstNode):
|
||||
"""
|
||||
A callable. Either a `Function` or a `ClosureExpr`.
|
||||
"""
|
||||
param_list: optional["ParamList"] | child
|
||||
attrs: list["Attr"] | child
|
||||
|
||||
@annotate(Function, add_bases=[Callable])
|
||||
class _:
|
||||
param_list: drop
|
||||
attrs: drop
|
||||
|
||||
|
||||
@annotate(ClosureExpr, add_bases=[Callable])
|
||||
class _:
|
||||
param_list: drop
|
||||
attrs: drop
|
||||
|
||||
Reference in New Issue
Block a user