mirror of
https://github.com/github/codeql.git
synced 2026-04-26 17:25:19 +02:00
Rust: generate code
This commit is contained in:
2
rust/extractor/src/generated/.generated.list
generated
2
rust/extractor/src/generated/.generated.list
generated
@@ -1,2 +1,2 @@
|
||||
mod.rs 4bcb9def847469aae9d8649461546b7c21ec97cf6e63d3cf394e339915ce65d7 4bcb9def847469aae9d8649461546b7c21ec97cf6e63d3cf394e339915ce65d7
|
||||
top.rs 855f5f0639dfafd8603c9b842f6470ca6d1214bb72391890a1de64db2adebba1 855f5f0639dfafd8603c9b842f6470ca6d1214bb72391890a1de64db2adebba1
|
||||
top.rs 7269710572ed5f727107f19cf4002ec19b8a4149842b351c6c61dbeb1ec35e5c 7269710572ed5f727107f19cf4002ec19b8a4149842b351c6c61dbeb1ec35e5c
|
||||
|
||||
347
rust/extractor/src/generated/top.rs
generated
347
rust/extractor/src/generated/top.rs
generated
@@ -3614,73 +3614,6 @@ impl From<trap::Label<BreakExpr>> for trap::Label<Locatable> {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct CallExpr {
|
||||
pub id: trap::TrapId<CallExpr>,
|
||||
pub arg_list: Option<trap::Label<ArgList>>,
|
||||
pub attrs: Vec<trap::Label<Attr>>,
|
||||
pub expr: Option<trap::Label<Expr>>,
|
||||
}
|
||||
|
||||
impl trap::TrapEntry for CallExpr {
|
||||
fn extract_id(&mut self) -> trap::TrapId<Self> {
|
||||
std::mem::replace(&mut self.id, trap::TrapId::Star)
|
||||
}
|
||||
|
||||
fn emit(self, id: trap::Label<Self>, out: &mut trap::Writer) {
|
||||
out.add_tuple("call_exprs", vec![id.into()]);
|
||||
if let Some(v) = self.arg_list {
|
||||
out.add_tuple("call_expr_arg_lists", vec![id.into(), v.into()]);
|
||||
}
|
||||
for (i, v) in self.attrs.into_iter().enumerate() {
|
||||
out.add_tuple("call_expr_attrs", vec![id.into(), i.into(), v.into()]);
|
||||
}
|
||||
if let Some(v) = self.expr {
|
||||
out.add_tuple("call_expr_exprs", vec![id.into(), v.into()]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl trap::TrapClass for CallExpr {
|
||||
fn class_name() -> &'static str { "CallExpr" }
|
||||
}
|
||||
|
||||
impl From<trap::Label<CallExpr>> for trap::Label<AstNode> {
|
||||
fn from(value: trap::Label<CallExpr>) -> Self {
|
||||
// SAFETY: this is safe because in the dbscheme CallExpr is a subclass of AstNode
|
||||
unsafe {
|
||||
Self::from_untyped(value.as_untyped())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<trap::Label<CallExpr>> for trap::Label<Element> {
|
||||
fn from(value: trap::Label<CallExpr>) -> Self {
|
||||
// SAFETY: this is safe because in the dbscheme CallExpr is a subclass of Element
|
||||
unsafe {
|
||||
Self::from_untyped(value.as_untyped())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<trap::Label<CallExpr>> for trap::Label<Expr> {
|
||||
fn from(value: trap::Label<CallExpr>) -> Self {
|
||||
// SAFETY: this is safe because in the dbscheme CallExpr is a subclass of Expr
|
||||
unsafe {
|
||||
Self::from_untyped(value.as_untyped())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<trap::Label<CallExpr>> for trap::Label<Locatable> {
|
||||
fn from(value: trap::Label<CallExpr>) -> Self {
|
||||
// SAFETY: this is safe because in the dbscheme CallExpr is a subclass of Locatable
|
||||
unsafe {
|
||||
Self::from_untyped(value.as_untyped())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct CastExpr {
|
||||
pub id: trap::TrapId<CastExpr>,
|
||||
@@ -4589,6 +4522,51 @@ impl From<trap::Label<FormatArgsExpr>> for trap::Label<Locatable> {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct FunctionOrMethodCallExpr {
|
||||
_unused: ()
|
||||
}
|
||||
|
||||
impl trap::TrapClass for FunctionOrMethodCallExpr {
|
||||
fn class_name() -> &'static str { "FunctionOrMethodCallExpr" }
|
||||
}
|
||||
|
||||
impl From<trap::Label<FunctionOrMethodCallExpr>> for trap::Label<AstNode> {
|
||||
fn from(value: trap::Label<FunctionOrMethodCallExpr>) -> Self {
|
||||
// SAFETY: this is safe because in the dbscheme FunctionOrMethodCallExpr is a subclass of AstNode
|
||||
unsafe {
|
||||
Self::from_untyped(value.as_untyped())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<trap::Label<FunctionOrMethodCallExpr>> for trap::Label<Element> {
|
||||
fn from(value: trap::Label<FunctionOrMethodCallExpr>) -> Self {
|
||||
// SAFETY: this is safe because in the dbscheme FunctionOrMethodCallExpr is a subclass of Element
|
||||
unsafe {
|
||||
Self::from_untyped(value.as_untyped())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<trap::Label<FunctionOrMethodCallExpr>> for trap::Label<Expr> {
|
||||
fn from(value: trap::Label<FunctionOrMethodCallExpr>) -> Self {
|
||||
// SAFETY: this is safe because in the dbscheme FunctionOrMethodCallExpr is a subclass of Expr
|
||||
unsafe {
|
||||
Self::from_untyped(value.as_untyped())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<trap::Label<FunctionOrMethodCallExpr>> for trap::Label<Locatable> {
|
||||
fn from(value: trap::Label<FunctionOrMethodCallExpr>) -> Self {
|
||||
// SAFETY: this is safe because in the dbscheme FunctionOrMethodCallExpr is a subclass of Locatable
|
||||
unsafe {
|
||||
Self::from_untyped(value.as_untyped())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct IdentPat {
|
||||
pub id: trap::TrapId<IdentPat>,
|
||||
@@ -5654,81 +5632,6 @@ impl From<trap::Label<MatchExpr>> for trap::Label<Locatable> {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct MethodCallExpr {
|
||||
pub id: trap::TrapId<MethodCallExpr>,
|
||||
pub arg_list: Option<trap::Label<ArgList>>,
|
||||
pub attrs: Vec<trap::Label<Attr>>,
|
||||
pub generic_arg_list: Option<trap::Label<GenericArgList>>,
|
||||
pub name_ref: Option<trap::Label<NameRef>>,
|
||||
pub receiver: Option<trap::Label<Expr>>,
|
||||
}
|
||||
|
||||
impl trap::TrapEntry for MethodCallExpr {
|
||||
fn extract_id(&mut self) -> trap::TrapId<Self> {
|
||||
std::mem::replace(&mut self.id, trap::TrapId::Star)
|
||||
}
|
||||
|
||||
fn emit(self, id: trap::Label<Self>, out: &mut trap::Writer) {
|
||||
out.add_tuple("method_call_exprs", vec![id.into()]);
|
||||
if let Some(v) = self.arg_list {
|
||||
out.add_tuple("method_call_expr_arg_lists", vec![id.into(), v.into()]);
|
||||
}
|
||||
for (i, v) in self.attrs.into_iter().enumerate() {
|
||||
out.add_tuple("method_call_expr_attrs", vec![id.into(), i.into(), v.into()]);
|
||||
}
|
||||
if let Some(v) = self.generic_arg_list {
|
||||
out.add_tuple("method_call_expr_generic_arg_lists", vec![id.into(), v.into()]);
|
||||
}
|
||||
if let Some(v) = self.name_ref {
|
||||
out.add_tuple("method_call_expr_name_refs", vec![id.into(), v.into()]);
|
||||
}
|
||||
if let Some(v) = self.receiver {
|
||||
out.add_tuple("method_call_expr_receivers", vec![id.into(), v.into()]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl trap::TrapClass for MethodCallExpr {
|
||||
fn class_name() -> &'static str { "MethodCallExpr" }
|
||||
}
|
||||
|
||||
impl From<trap::Label<MethodCallExpr>> for trap::Label<AstNode> {
|
||||
fn from(value: trap::Label<MethodCallExpr>) -> Self {
|
||||
// SAFETY: this is safe because in the dbscheme MethodCallExpr is a subclass of AstNode
|
||||
unsafe {
|
||||
Self::from_untyped(value.as_untyped())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<trap::Label<MethodCallExpr>> for trap::Label<Element> {
|
||||
fn from(value: trap::Label<MethodCallExpr>) -> Self {
|
||||
// SAFETY: this is safe because in the dbscheme MethodCallExpr is a subclass of Element
|
||||
unsafe {
|
||||
Self::from_untyped(value.as_untyped())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<trap::Label<MethodCallExpr>> for trap::Label<Expr> {
|
||||
fn from(value: trap::Label<MethodCallExpr>) -> Self {
|
||||
// SAFETY: this is safe because in the dbscheme MethodCallExpr is a subclass of Expr
|
||||
unsafe {
|
||||
Self::from_untyped(value.as_untyped())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<trap::Label<MethodCallExpr>> for trap::Label<Locatable> {
|
||||
fn from(value: trap::Label<MethodCallExpr>) -> Self {
|
||||
// SAFETY: this is safe because in the dbscheme MethodCallExpr is a subclass of Locatable
|
||||
unsafe {
|
||||
Self::from_untyped(value.as_untyped())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct NeverType {
|
||||
pub id: trap::TrapId<NeverType>,
|
||||
@@ -7953,6 +7856,82 @@ impl From<trap::Label<YieldExpr>> for trap::Label<Locatable> {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct CallExpr {
|
||||
pub id: trap::TrapId<CallExpr>,
|
||||
pub arg_list: Option<trap::Label<ArgList>>,
|
||||
pub attrs: Vec<trap::Label<Attr>>,
|
||||
pub expr: Option<trap::Label<Expr>>,
|
||||
}
|
||||
|
||||
impl trap::TrapEntry for CallExpr {
|
||||
fn extract_id(&mut self) -> trap::TrapId<Self> {
|
||||
std::mem::replace(&mut self.id, trap::TrapId::Star)
|
||||
}
|
||||
|
||||
fn emit(self, id: trap::Label<Self>, out: &mut trap::Writer) {
|
||||
out.add_tuple("call_exprs", vec![id.into()]);
|
||||
if let Some(v) = self.arg_list {
|
||||
out.add_tuple("function_or_method_call_expr_arg_lists", vec![id.into(), v.into()]);
|
||||
}
|
||||
for (i, v) in self.attrs.into_iter().enumerate() {
|
||||
out.add_tuple("function_or_method_call_expr_attrs", vec![id.into(), i.into(), v.into()]);
|
||||
}
|
||||
if let Some(v) = self.expr {
|
||||
out.add_tuple("call_expr_exprs", vec![id.into(), v.into()]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl trap::TrapClass for CallExpr {
|
||||
fn class_name() -> &'static str { "CallExpr" }
|
||||
}
|
||||
|
||||
impl From<trap::Label<CallExpr>> for trap::Label<AstNode> {
|
||||
fn from(value: trap::Label<CallExpr>) -> Self {
|
||||
// SAFETY: this is safe because in the dbscheme CallExpr is a subclass of AstNode
|
||||
unsafe {
|
||||
Self::from_untyped(value.as_untyped())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<trap::Label<CallExpr>> for trap::Label<Element> {
|
||||
fn from(value: trap::Label<CallExpr>) -> Self {
|
||||
// SAFETY: this is safe because in the dbscheme CallExpr is a subclass of Element
|
||||
unsafe {
|
||||
Self::from_untyped(value.as_untyped())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<trap::Label<CallExpr>> for trap::Label<Expr> {
|
||||
fn from(value: trap::Label<CallExpr>) -> Self {
|
||||
// SAFETY: this is safe because in the dbscheme CallExpr is a subclass of Expr
|
||||
unsafe {
|
||||
Self::from_untyped(value.as_untyped())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<trap::Label<CallExpr>> for trap::Label<FunctionOrMethodCallExpr> {
|
||||
fn from(value: trap::Label<CallExpr>) -> Self {
|
||||
// SAFETY: this is safe because in the dbscheme CallExpr is a subclass of FunctionOrMethodCallExpr
|
||||
unsafe {
|
||||
Self::from_untyped(value.as_untyped())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<trap::Label<CallExpr>> for trap::Label<Locatable> {
|
||||
fn from(value: trap::Label<CallExpr>) -> Self {
|
||||
// SAFETY: this is safe because in the dbscheme CallExpr is a subclass of Locatable
|
||||
unsafe {
|
||||
Self::from_untyped(value.as_untyped())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct Const {
|
||||
pub id: trap::TrapId<Const>,
|
||||
@@ -8758,6 +8737,90 @@ impl From<trap::Label<MacroRules>> for trap::Label<Stmt> {
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct MethodCallExpr {
|
||||
pub id: trap::TrapId<MethodCallExpr>,
|
||||
pub arg_list: Option<trap::Label<ArgList>>,
|
||||
pub attrs: Vec<trap::Label<Attr>>,
|
||||
pub generic_arg_list: Option<trap::Label<GenericArgList>>,
|
||||
pub name_ref: Option<trap::Label<NameRef>>,
|
||||
pub receiver: Option<trap::Label<Expr>>,
|
||||
}
|
||||
|
||||
impl trap::TrapEntry for MethodCallExpr {
|
||||
fn extract_id(&mut self) -> trap::TrapId<Self> {
|
||||
std::mem::replace(&mut self.id, trap::TrapId::Star)
|
||||
}
|
||||
|
||||
fn emit(self, id: trap::Label<Self>, out: &mut trap::Writer) {
|
||||
out.add_tuple("method_call_exprs", vec![id.into()]);
|
||||
if let Some(v) = self.arg_list {
|
||||
out.add_tuple("function_or_method_call_expr_arg_lists", vec![id.into(), v.into()]);
|
||||
}
|
||||
for (i, v) in self.attrs.into_iter().enumerate() {
|
||||
out.add_tuple("function_or_method_call_expr_attrs", vec![id.into(), i.into(), v.into()]);
|
||||
}
|
||||
if let Some(v) = self.generic_arg_list {
|
||||
out.add_tuple("method_call_expr_generic_arg_lists", vec![id.into(), v.into()]);
|
||||
}
|
||||
if let Some(v) = self.name_ref {
|
||||
out.add_tuple("method_call_expr_name_refs", vec![id.into(), v.into()]);
|
||||
}
|
||||
if let Some(v) = self.receiver {
|
||||
out.add_tuple("method_call_expr_receivers", vec![id.into(), v.into()]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl trap::TrapClass for MethodCallExpr {
|
||||
fn class_name() -> &'static str { "MethodCallExpr" }
|
||||
}
|
||||
|
||||
impl From<trap::Label<MethodCallExpr>> for trap::Label<AstNode> {
|
||||
fn from(value: trap::Label<MethodCallExpr>) -> Self {
|
||||
// SAFETY: this is safe because in the dbscheme MethodCallExpr is a subclass of AstNode
|
||||
unsafe {
|
||||
Self::from_untyped(value.as_untyped())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<trap::Label<MethodCallExpr>> for trap::Label<Element> {
|
||||
fn from(value: trap::Label<MethodCallExpr>) -> Self {
|
||||
// SAFETY: this is safe because in the dbscheme MethodCallExpr is a subclass of Element
|
||||
unsafe {
|
||||
Self::from_untyped(value.as_untyped())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<trap::Label<MethodCallExpr>> for trap::Label<Expr> {
|
||||
fn from(value: trap::Label<MethodCallExpr>) -> Self {
|
||||
// SAFETY: this is safe because in the dbscheme MethodCallExpr is a subclass of Expr
|
||||
unsafe {
|
||||
Self::from_untyped(value.as_untyped())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<trap::Label<MethodCallExpr>> for trap::Label<FunctionOrMethodCallExpr> {
|
||||
fn from(value: trap::Label<MethodCallExpr>) -> Self {
|
||||
// SAFETY: this is safe because in the dbscheme MethodCallExpr is a subclass of FunctionOrMethodCallExpr
|
||||
unsafe {
|
||||
Self::from_untyped(value.as_untyped())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl From<trap::Label<MethodCallExpr>> for trap::Label<Locatable> {
|
||||
fn from(value: trap::Label<MethodCallExpr>) -> Self {
|
||||
// SAFETY: this is safe because in the dbscheme MethodCallExpr is a subclass of Locatable
|
||||
unsafe {
|
||||
Self::from_untyped(value.as_untyped())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct Module {
|
||||
pub id: trap::TrapId<Module>,
|
||||
|
||||
19
rust/ql/.generated.list
generated
19
rust/ql/.generated.list
generated
@@ -14,7 +14,7 @@ lib/codeql/rust/elements/BinaryExpr.qll 394522da3bc3a716fc7bc40c3560143ca840f5d2
|
||||
lib/codeql/rust/elements/BlockExpr.qll b952fd44b89de248931d4089834d2c9406f6f2fc1a3f5c2365156be4e55157cf daccc07ab11ac696679b9fadc99f40b1bf579c90bf6c7cca6e82eaa313932ede
|
||||
lib/codeql/rust/elements/BoxPat.qll 1b2c3fff171aa6aa238c9460b122f26c79e04577cea67fa856de99842ba873d4 0caf8d23ed6e0997a6b8751def27641582151fba6e24fccf798712a4690b42f1
|
||||
lib/codeql/rust/elements/BreakExpr.qll 7ca3807a20e9a9a988d1fd7abebf240325ed422fcb45c719ba46272f031f94db dffb7379d3f3ba220acfbd05eb7bb6cfd9cfda211e9c8b1f5240ca5fa61be3fc
|
||||
lib/codeql/rust/elements/CallExpr.qll 6760ef2753fcaa9f02860bfeadfd1b1603d0d5b35f5dd72b33a474c206f51a29 55afe003eb51ef28b382af368429930d858d291bb7d76d71149eee1c805731f1
|
||||
lib/codeql/rust/elements/CallExpr.qll 4232f42c54212fe9e8aa140194da324b77581395a4d5c899190d469609598668 a589e19792174b18ce39b74e19828bfe5c7ff796424c05f6a6084eab4ff16ab4
|
||||
lib/codeql/rust/elements/CastExpr.qll ba281bde130f43c486c4ad889539b77fba9e41afdf7980e50b6a8696a1ec7527 61257003d395896ec60729d0bc01da36697615bb725d07141255fbb5c44e50a0
|
||||
lib/codeql/rust/elements/ClosureBinder.qll 977df800f97cc9b03fffb5e5e1fc6acd08a2938e04cb6ad91108784a15b0d510 f6fad4127226fe1dff2f16416d8a7fde5d8ab4a88f30e443ac5e5ff618de3e05
|
||||
lib/codeql/rust/elements/ClosureExpr.qll 8f06357ae134e42c073eef994c83c04b8cf294fe33b286dbd75c0e705ce29d05 9d9e282d965fed723965376801d4afa49444d1d9be9b093d02e276729a2cf7ad
|
||||
@@ -41,6 +41,7 @@ lib/codeql/rust/elements/ForType.qll 0036bed8749358c356d78c4a0eef40d73e279628429
|
||||
lib/codeql/rust/elements/FormatArgsArg.qll 5bc9b4cd1bac7131165836e93838c45452a08ea6011741cbddace3cbf9c69440 f825140e98dc9800d5c045402186793c7b21511448e2f6bf6402d1e06305219c
|
||||
lib/codeql/rust/elements/FormatArgsExpr.qll f2ffad5a1105b29a8437c8ed6cf918cfcf4d65ac164bbf1be0585c3b673ca749 3ba20dc312a0a994bb43b37b2db72cbd4e06061b97918fa0e84ce355070ffbeb
|
||||
lib/codeql/rust/elements/Function.qll 736c53408f8674c88c352cd1f08f7c77e51551c68ef802f2e1c1aaf3d44fa8e9 6b52dbea081a5e799f1a2cedd57be5485bc8e018ded7249a1852343053d849a6
|
||||
lib/codeql/rust/elements/FunctionOrMethodCallExpr.qll 69754853bd452c18a333e2bb70a401726cc115092a120662edac5b24586f1951 1d9226ea609d298ec76eaf6a25248c96315b14a5993ac7c8dfd7fd80e1c134fb
|
||||
lib/codeql/rust/elements/GenericArg.qll 5f11ce0e3c5f08de84db61f56ba1b984652455ba6b95a8b8a5b5a235913d4072 756b6a73d66fde45bdcc65ce2362a5b1391af2927e6d54b6550b3ecd5fd11e75
|
||||
lib/codeql/rust/elements/GenericArgList.qll dcf274db517b0e8f19e4545d77f86cdd4066ff2805e68c808d0bb5750b49f569 1055a82929e850264e501b367ef4d314a3e6bb8943ec95f4284d157fb4d0092f
|
||||
lib/codeql/rust/elements/GenericParam.qll b58448b808d6dfa05db9574f54c22ce51f0b1d78784263c75a95d6bfc787067d 4afbab71fe717d7d7d3e2f60ea8c3d97bcb29b17b4efb79eabfe8f070edcb9bb
|
||||
@@ -75,7 +76,7 @@ lib/codeql/rust/elements/MatchArmList.qll e6c48fd7419d88e996b82eb45e4aa2686dfd07
|
||||
lib/codeql/rust/elements/MatchExpr.qll e9ef1664f020823b6f4bb72d906a9dc0c1ee6432d4a9a13f7dbdbab2b2b1ee4d 38d71e5c487abcb5682293c573343be66e499a6e131bb630604c120d34b7777b
|
||||
lib/codeql/rust/elements/MatchGuard.qll 20754ab2009a7d40b50feece496ff7f38650586d79190ed2a372308594693694 471f8f118317efcf112f4ddfd60125ca2a9d9b3b08e6ee331c430961de7885ff
|
||||
lib/codeql/rust/elements/Meta.qll 9fa3216c86fa55ed5c0c4671708110a6ffc7c0f5d6cda8dda31aaff17f87534d c44ee2754dd71776ffd0a8a7d6c1ae8737c47e998e6bdb8efab5283625807cf4
|
||||
lib/codeql/rust/elements/MethodCallExpr.qll 0a5cab9f21741f6a38956e6de4f6beb143db5d85ee590f9908dab3da300a6b72 df21eba9cf2823a7b06eb6672dd8249225e7c16d5b6c1c37c1f2a175d9513272
|
||||
lib/codeql/rust/elements/MethodCallExpr.qll d19c02fdd2f6f649dfbf757c53f4af441f10842ca69f56b13d218e343961688b eafb571244dcbec1bb8106f8ec03c641ca383b51b615506bf0d7bc90a1aa1934
|
||||
lib/codeql/rust/elements/Missing.qll 70e6ac9790314752849c9888443c98223ccfc93a193998b7ce350b2c6ebe8ea4 e2f0623511acaa76b091f748d417714137a8b94f1f2bdbbd177f1c682c786dad
|
||||
lib/codeql/rust/elements/Module.qll 0bc85019177709256f8078d9de2a36f62f848d476225bff7bba1e35f249875c7 3fbb70e0c417a644dd0cada2c364c6e6876cfa16f37960e219c87e49c966c94e
|
||||
lib/codeql/rust/elements/Name.qll 3d7ed16c232912e30e5a075f5087ad344a8f76dcc27bc8f71a80c133802b89d7 036dc3ba0c20eb0907ef6dcc532214aa5de8e0de0fa819eca1fce0355b3741a3
|
||||
@@ -229,6 +230,7 @@ lib/codeql/rust/elements/internal/FormatArgsArgImpl.qll 601f7715e9a65bcfa7cea197
|
||||
lib/codeql/rust/elements/internal/FormatArgsExprConstructor.qll ce29ff5a839b885b1ab7a02d6a381ae474ab1be3e6ee7dcfd7595bdf28e4b558 63bf957426871905a51ea319662a59e38104c197a1024360aca364dc145b11e8
|
||||
lib/codeql/rust/elements/internal/FormatArgsExprImpl.qll bdb992ebc6be59311b486f40325b39f52a69921cfc66a731085cb184da00050f 6336e7770f9cb700f1b3914fd940c3423ab4e971b34ed8fcc79da80c1f1cdba3
|
||||
lib/codeql/rust/elements/internal/FunctionConstructor.qll b50aea579938d03745dfbd8b5fa8498f7f83b967369f63d6875510e09ab7f5d2 19cca32aeaecaf9debc27329e8c39ecec69464bb1d89d7b09908a1d73a8d92a2
|
||||
lib/codeql/rust/elements/internal/FunctionOrMethodCallExprImpl.qll 34e7b5c95c8f0fdbd9c52159494e21046acbd0d62e1fb9b2eee53a11f15be261 105783845539bc44f05473efe8bedbc033fb5fb107c2daa77af664bfccb20bf6
|
||||
lib/codeql/rust/elements/internal/GenericArgImpl.qll 6b1b804c357425c223f926e560a688e81506f5a35b95485cecf704e88cc009ee cc1ccf6a23dadc397e82664f3911d4b385d4c8ca80b1ee16d5275d9c936148dd
|
||||
lib/codeql/rust/elements/internal/GenericArgListConstructor.qll 46859bb3eb09d77987a18642d65ba2e13471a4dc9c0a83a192fddc82e37c335c 2c7d54c876269a88d3461b05745e73b06532b1616cae9b614ac94b28735d8fc4
|
||||
lib/codeql/rust/elements/internal/GenericArgListImpl.qll 1a39ba7080147abccaaba451852c9c124fb6177f2ebd64e38ee74014444a34e1 80df3150c961936037ac02b46ef5f775c3f82e66490afbca00a016cb9eee798a
|
||||
@@ -459,7 +461,7 @@ lib/codeql/rust/elements/internal/generated/BinaryExpr.qll 64e9bd9c571edd6e5f3e7
|
||||
lib/codeql/rust/elements/internal/generated/BlockExpr.qll 6fc90a80e60f017bf3418e45bcc35b5ddac59b51037c21aed3955d47c147ce4a 1f3f8e5107b0c6de381b7c94aab93dc5fd758a845c6ff9554888df453f1315d0
|
||||
lib/codeql/rust/elements/internal/generated/BoxPat.qll ec946a3e671ab7417e04b0207967adad004df512c570c4f0780ca5816d12d75f b0e64860855c4e85914042b1a51034899ff7cd1b2c6857188de89310a2726ea3
|
||||
lib/codeql/rust/elements/internal/generated/BreakExpr.qll 0f428a8b2f4209b134c2ffc3e1c93c30bc6b0e9c9172f140cefa88c1f77d8690 957b39f38ff6befe9061f55bc0b403c2f1c366dd0cf63b874bae6f8216576d76
|
||||
lib/codeql/rust/elements/internal/generated/CallExpr.qll c2700dbd9c33dcc14de10dc72ff49abafdf0952257864d4435cf8ac46849a2ee 7932f725f97ffbe1b050c2622a61a0d56f18c9264a3293466cba9915313495b5
|
||||
lib/codeql/rust/elements/internal/generated/CallExpr.qll 2ed74ea3da426b351949291ae728eb6d70de033cccc667712988cf416319e999 af84a17bf5512dc97d8781cb0aa868c7f5349932596f2600785d2432e15ece3a
|
||||
lib/codeql/rust/elements/internal/generated/CastExpr.qll d6fbf02e9e202254666082a9116634d0eb933177866ac4c0a57b5e9c4bb4b383 477f67773492e3b82695461d56327c9db05a7d1a67e8d192406265f2ce369670
|
||||
lib/codeql/rust/elements/internal/generated/ClosureBinder.qll 94c0dcdd4cd87d115659d496c88a98354bc7d4ddc0fa27028003bf7688b99987 d59d713b426dbbdb775df9092d176eea031dac1f14e468810f2fc8591399cd19
|
||||
lib/codeql/rust/elements/internal/generated/ClosureExpr.qll f9047451cb8b53f8b77e1c01f7ef485d5b5a92999e0591c6702062050052fa2f 2252be8b3022c587a8c6ad93b64d856263be7bfe2938c1d063e7cad845dd38e2
|
||||
@@ -486,6 +488,7 @@ lib/codeql/rust/elements/internal/generated/ForType.qll 3d43d044a1189281f09c55ca
|
||||
lib/codeql/rust/elements/internal/generated/FormatArgsArg.qll e07a1ae310f590003f1b88fada7dcf4847c99adb9d4c838d1c88e66e1da85c5f 0ef7342451fe2cb06e765fb4b33bb8c4a9b927f5edbc8feb5c6ba3655697f447
|
||||
lib/codeql/rust/elements/internal/generated/FormatArgsExpr.qll 40d6daa7d2bafb33798a21d79774dc802cfbd7a31618ac3bd0149399ea2bf893 d1172e2151791228559004792e125fc4625f6a26ffad25f29efb0ad263bf8795
|
||||
lib/codeql/rust/elements/internal/generated/Function.qll b239af1a8874802b8a311706c53d56e3ceaad7ed23a7f97d1694bf961b63768b 4bc3c23685fa05820222e472ab1cdb40a271f862727d3bd878d47de9c2e3f485
|
||||
lib/codeql/rust/elements/internal/generated/FunctionOrMethodCallExpr.qll 5c6e3b4e4d3a91d0bb934dd2402898767ef6156b7b419222dfbc144167780231 67c82e154ff4c68f601fd92ba8aad7a8dd5b688dc89189744e1515bb647e9669
|
||||
lib/codeql/rust/elements/internal/generated/GenericArg.qll 464da0ba1c5ddcd1be68617167f177773d99b5ac4775ec8ea24d503e789a9099 6faa1033d59baf7c210ac4837a55781cfc054b7acbad8027faf4630dbfa6e101
|
||||
lib/codeql/rust/elements/internal/generated/GenericArgList.qll b8cd936bba6f28344e28c98acf38acb8ef43af6ecf8367d79ed487e5b9da17cb 8b14331261e49d004807285b02fca190aafd62bfb9378b05c7d9c1e95525fe7b
|
||||
lib/codeql/rust/elements/internal/generated/GenericParam.qll a0285123f974f287154b706bf6688b86edf72a4adcec57346c654d962435651b b42c3915e9564b5b5c5282229bf882aa3309de26a77721b2255d6f4235c0cc38
|
||||
@@ -520,7 +523,7 @@ lib/codeql/rust/elements/internal/generated/MatchArmList.qll 13362680c037fe83fef
|
||||
lib/codeql/rust/elements/internal/generated/MatchExpr.qll 689d65f690fe05bc262d0a5bfe69bb4f8a142db387c5765fcc4958a9b49989f8 2979cd2017d0538870d17b2b7592c75cc05b706bd36c9de3e5dc38fa3a957e5b
|
||||
lib/codeql/rust/elements/internal/generated/MatchGuard.qll 521a507883963106780f1782084c581fbcf1179863c7c15438c4db79e30e78dd 6226feffaaa8d828a42ece0c693e616cd375672eb987c3b7ff1ca15fa23c116a
|
||||
lib/codeql/rust/elements/internal/generated/Meta.qll f1ce7cdaf2a6fa3b86f0465e33a9521d254c032468427b276d93276ffd5142be 046d72c868ee2664b8a291de16320238ece9d0612c93c96a0d601e0b6079bf90
|
||||
lib/codeql/rust/elements/internal/generated/MethodCallExpr.qll c2d6faf1f840628dbc5aa59c90dbd8b244f6bd4a7dba25e410047fcde11ff378 2d0251b095bf15b0275d493efdd1f9ce0926a3cff6671bb550a7a672aaf62a30
|
||||
lib/codeql/rust/elements/internal/generated/MethodCallExpr.qll 89f5d6248ea338f0b3add9de4166df411bce2f8589b164d0a69db4650e4bcd71 3e13ddfa857e0a3655e7030b3d4ab411b09d6f0ea960b098f54ffcc1d8394d91
|
||||
lib/codeql/rust/elements/internal/generated/Missing.qll 16735d91df04a4e1ae52fae25db5f59a044e540755734bbab46b5fbb0fe6b0bd 28ca4e49fb7e6b4734be2f2f69e7c224c570344cc160ef80c5a5cd413e750dad
|
||||
lib/codeql/rust/elements/internal/generated/Module.qll ebae5d8963c9fd569c0fbad1d7770abd3fd2479437f236cbce0505ba9f9af52c fa3c382115fed18a26f1a755d8749a201b9489f82c09448a88fb8e9e1435fe5f
|
||||
lib/codeql/rust/elements/internal/generated/Name.qll 12aad57744b7d1b04454159536409244c47319aedd580acb58ee93ef9d7f837d 63fc67ccc085db22f82576a53489f15216a7c29d5b941b14a965eab481534e2e
|
||||
@@ -533,7 +536,7 @@ lib/codeql/rust/elements/internal/generated/ParamList.qll c808c9d84dd7800573832b
|
||||
lib/codeql/rust/elements/internal/generated/ParenExpr.qll bc0731505bfe88516205ec360582a4222d2681d11342c93e15258590ddee82f2 d4bd6e0c80cf1d63746c88d4bcb3a01d4c75732e5da09e3ebd9437ced227fb60
|
||||
lib/codeql/rust/elements/internal/generated/ParenPat.qll ce24b8f8ecbf0f204af200317405724063887257460c80cf250c39b2fdf37185 e7c87d37e1a0ca7ea03840017e1aa9ddb7f927f1f3b6396c0305b46aeee33db6
|
||||
lib/codeql/rust/elements/internal/generated/ParenType.qll 9cc954d73f8330dcac7b475f97748b63af5c8766dee9d2f2872c0a7e4c903537 c07534c8a9c683c4a9b11d490095647e420de0a0bfc23273eaf6f31b00244273
|
||||
lib/codeql/rust/elements/internal/generated/ParentChild.qll ad728d69b3ef9555d71db2274b04a5ba99b4f815120c55032c57d077e0c954ca 64c6406626a14ed3052d3996cc47fc91e435175bd982440d948416cf878400fd
|
||||
lib/codeql/rust/elements/internal/generated/ParentChild.qll 36a5d76d16a00cb18ee2e3193708b795e502ca9a92e72b8047e215961da3c5c8 dae8c9eda242e6d4c153f070ea4eefe1cbaae44aa148c5a79a852c9f1c8f7b2d
|
||||
lib/codeql/rust/elements/internal/generated/Pat.qll 3605ac062be2f294ee73336e9669027b8b655f4ad55660e1eab35266275154ee 7f9400db2884d336dd1d21df2a8093759c2a110be9bf6482ce8e80ae0fd74ed4
|
||||
lib/codeql/rust/elements/internal/generated/Path.qll 299abce24762a5ab023f3cf1ab9718b83047e171aed42a8092e7a155914b1657 db1a23d18640c548f08c9f94823838b5e019ac85877c7b15df2d1493d1846572
|
||||
lib/codeql/rust/elements/internal/generated/PathExpr.qll 17cdb0a7393258a207450f08e37178fc9d35d167f064ba6015be94246f3dc933 a75fdd280aff6d87e083a92030e041c2eb52b57cf7151d4a6989fcd31d6a64bf
|
||||
@@ -545,7 +548,7 @@ lib/codeql/rust/elements/internal/generated/PtrType.qll 5f12b6ad29b4e5ce51c205e2
|
||||
lib/codeql/rust/elements/internal/generated/PureSynthConstructors.qll dc03515d678ba052c2ff2dd9f0883e0bce54cac740ba9a15e5173f292c1b6971 dc03515d678ba052c2ff2dd9f0883e0bce54cac740ba9a15e5173f292c1b6971
|
||||
lib/codeql/rust/elements/internal/generated/RangeExpr.qll 23cca03bf43535f33b22a38894f70d669787be4e4f5b8fe5c8f7b964d30e9027 18624cef6c6b679eeace2a98737e472432e0ead354cca02192b4d45330f047c9
|
||||
lib/codeql/rust/elements/internal/generated/RangePat.qll efd93730de217cf50dcba5875595263a5eadf9f7e4e1272401342a094d158614 229b251b3d118932e31e78ac4dfb75f48b766f240f20d436062785606d44467b
|
||||
lib/codeql/rust/elements/internal/generated/Raw.qll 783c3d04b798c0a5281baf88aa3ada406492e6e6b8ff41dac658d52c88f95c46 e69891409fc89f0a3a199feb6f1a734bfdd862239a5f6794de0ee811e69fab04
|
||||
lib/codeql/rust/elements/internal/generated/Raw.qll 468493674e9f891b6b289d07dd3f6d4369ab04411b8d20a81673f56dfe3abeb4 5876c9a5cc5ede7503b9f524184585abf8fba21fa94887033d2488205d3b4f94
|
||||
lib/codeql/rust/elements/internal/generated/RecordExpr.qll eb6cb662e463f9260efae1a6ce874fa781172063b916ef1963f861e9942d308d 1a21cbccc8f3799ff13281e822818ebfb21d81591720a427cac3625512cb9d40
|
||||
lib/codeql/rust/elements/internal/generated/RecordExprField.qll 7e9f8663d3b74ebbc9603b10c9912f082febba6bd73d344b100bbd3edf837802 fbe6b578e7fd5d5a6f21bbb8c388957ab7210a6a249ec71510a50fb35b319ea1
|
||||
lib/codeql/rust/elements/internal/generated/RecordExprFieldList.qll 179a97211fe7aa6265085d4d54115cdbc0e1cd7c9b2135591e8f36d6432f13d3 dd44bbbc1e83a1ed3a587afb729d7debf7aeb7b63245de181726af13090e50c0
|
||||
@@ -570,7 +573,7 @@ lib/codeql/rust/elements/internal/generated/Static.qll cae5313e08e4af44c46b25802
|
||||
lib/codeql/rust/elements/internal/generated/Stmt.qll 8473ff532dd5cc9d7decaddcd174b94d610f6ca0aec8e473cc051dad9f3db917 6ef7d2b5237c2dbdcacbf7d8b39109d4dc100229f2b28b5c9e3e4fbf673ba72b
|
||||
lib/codeql/rust/elements/internal/generated/StmtList.qll a667193e32341e17400867c6e359878c4e645ef9f5f4d97676afc0283a33a026 a320ed678ee359302e2fc1b70a9476705cd616fcfa44a499d32f0c7715627f73
|
||||
lib/codeql/rust/elements/internal/generated/Struct.qll 4d57f0db12dc7ad3e31e750a24172ef1505406b4dab16386af0674bd18bf8f4b 1a73c83df926b996f629316f74c61ea775be04532ab61b56af904223354f033e
|
||||
lib/codeql/rust/elements/internal/generated/Synth.qll 99fa143232f2cfb1ef3f6ed6a51afa634c336361105e37719ce11ca6c74de8ee b3b77e1bdea36022b3be7cef000e7113059eb8b2b1afec26ae1d62e84259143b
|
||||
lib/codeql/rust/elements/internal/generated/Synth.qll 908954d21685d16362d15c4170de397fd0af45bcd2038245b863196c96f0caeb 2a696c02a9c57411312ecbad592abd3718d4e73fbd070a2c5b03273358ed3c9d
|
||||
lib/codeql/rust/elements/internal/generated/SynthConstructors.qll 518b68ccf6d0791bc0c141486261108bb1723e37743fc7f8e4167a1d61660531 518b68ccf6d0791bc0c141486261108bb1723e37743fc7f8e4167a1d61660531
|
||||
lib/codeql/rust/elements/internal/generated/Token.qll 77a91a25ca5669703cf3a4353b591cef4d72caa6b0b9db07bb9e005d69c848d1 2fdffc4882ed3a6ca9ac6d1fb5f1ac5a471ca703e2ffdc642885fa558d6e373b
|
||||
lib/codeql/rust/elements/internal/generated/TokenTree.qll 8577c2b097c1be2f0f7daa5acfcf146f78674a424d99563e08a84dd3e6d91b46 d2f30764e84dbfc0a6a5d3d8a5f935cd432413688cb32da9c94e420fbc10665c
|
||||
@@ -605,7 +608,7 @@ lib/codeql/rust/elements/internal/generated/WhileExpr.qll fec8a9211b82a80601bf73
|
||||
lib/codeql/rust/elements/internal/generated/WildcardPat.qll d74b70b57a0a66bfae017a329352a5b27a6b9e73dd5521d627f680e810c6c59e 4b913b548ba27ff3c82fcd32cf996ff329cb57d176d3bebd0fcef394486ea499
|
||||
lib/codeql/rust/elements/internal/generated/YeetExpr.qll cac328200872a35337b4bcb15c851afb4743f82c080f9738d295571eb01d7392 94af734eea08129b587fed849b643e7572800e8330c0b57d727d41abda47930b
|
||||
lib/codeql/rust/elements/internal/generated/YieldExpr.qll 37e5f0c1e373a22bbc53d8b7f2c0e1f476e5be5080b8437c5e964f4e83fad79a 4a9a68643401637bf48e5c2b2f74a6bf0ddcb4ff76f6bffb61d436b685621e85
|
||||
lib/codeql/rust/elements.qll 926e6e5f994ef7fcd04854c4d69004d7bfd81950e132c9d3d501b4b2420db222 926e6e5f994ef7fcd04854c4d69004d7bfd81950e132c9d3d501b4b2420db222
|
||||
lib/codeql/rust/elements.qll c647c2f20c9d20d49214026ea0e2965d0b751db567baceaf7a9225a8efa2546b c647c2f20c9d20d49214026ea0e2965d0b751db567baceaf7a9225a8efa2546b
|
||||
test/extractor-tests/generated/Abi/Abi.ql 7f6e7dc4af86eca3ebdc79b10373988cd0871bd78b51997d3cffd969105e5fdd 2f936b6ca005c6157c755121584410c03e4a3949c23bee302fbe05ee10ce118f
|
||||
test/extractor-tests/generated/Abi/Abi_getAbiString.ql a496762fcec5a0887b87023bbf93e9b650f02e20113e25c44d6e4281ae8f5335 14109c7ce11ba25e3cd6e7f1b3fcb4cb00622f2a4eac91bfe43145c5f366bc52
|
||||
test/extractor-tests/generated/ArgList/ArgList.ql e412927756e72165d0e7c5c9bd3fca89d08197bbf760db8fb7683c64bb2229bc 043dba8506946fbb87753e22c387987d7eded6ddb963aa067f9e60ef9024d684
|
||||
|
||||
3
rust/ql/.gitattributes
generated
vendored
3
rust/ql/.gitattributes
generated
vendored
@@ -43,6 +43,7 @@
|
||||
/lib/codeql/rust/elements/FormatArgsArg.qll linguist-generated
|
||||
/lib/codeql/rust/elements/FormatArgsExpr.qll linguist-generated
|
||||
/lib/codeql/rust/elements/Function.qll linguist-generated
|
||||
/lib/codeql/rust/elements/FunctionOrMethodCallExpr.qll linguist-generated
|
||||
/lib/codeql/rust/elements/GenericArg.qll linguist-generated
|
||||
/lib/codeql/rust/elements/GenericArgList.qll linguist-generated
|
||||
/lib/codeql/rust/elements/GenericParam.qll linguist-generated
|
||||
@@ -231,6 +232,7 @@
|
||||
/lib/codeql/rust/elements/internal/FormatArgsExprConstructor.qll linguist-generated
|
||||
/lib/codeql/rust/elements/internal/FormatArgsExprImpl.qll linguist-generated
|
||||
/lib/codeql/rust/elements/internal/FunctionConstructor.qll linguist-generated
|
||||
/lib/codeql/rust/elements/internal/FunctionOrMethodCallExprImpl.qll linguist-generated
|
||||
/lib/codeql/rust/elements/internal/GenericArgImpl.qll linguist-generated
|
||||
/lib/codeql/rust/elements/internal/GenericArgListConstructor.qll linguist-generated
|
||||
/lib/codeql/rust/elements/internal/GenericArgListImpl.qll linguist-generated
|
||||
@@ -488,6 +490,7 @@
|
||||
/lib/codeql/rust/elements/internal/generated/FormatArgsArg.qll linguist-generated
|
||||
/lib/codeql/rust/elements/internal/generated/FormatArgsExpr.qll linguist-generated
|
||||
/lib/codeql/rust/elements/internal/generated/Function.qll linguist-generated
|
||||
/lib/codeql/rust/elements/internal/generated/FunctionOrMethodCallExpr.qll linguist-generated
|
||||
/lib/codeql/rust/elements/internal/generated/GenericArg.qll linguist-generated
|
||||
/lib/codeql/rust/elements/internal/generated/GenericArgList.qll linguist-generated
|
||||
/lib/codeql/rust/elements/internal/generated/GenericParam.qll linguist-generated
|
||||
|
||||
1
rust/ql/lib/codeql/rust/elements.qll
generated
1
rust/ql/lib/codeql/rust/elements.qll
generated
@@ -46,6 +46,7 @@ import codeql.rust.elements.ForType
|
||||
import codeql.rust.elements.FormatArgsArg
|
||||
import codeql.rust.elements.FormatArgsExpr
|
||||
import codeql.rust.elements.Function
|
||||
import codeql.rust.elements.FunctionOrMethodCallExpr
|
||||
import codeql.rust.elements.GenericArg
|
||||
import codeql.rust.elements.GenericArgList
|
||||
import codeql.rust.elements.GenericParam
|
||||
|
||||
3
rust/ql/lib/codeql/rust/elements/CallExpr.qll
generated
3
rust/ql/lib/codeql/rust/elements/CallExpr.qll
generated
@@ -4,9 +4,8 @@
|
||||
*/
|
||||
|
||||
private import internal.CallExprImpl
|
||||
import codeql.rust.elements.ArgList
|
||||
import codeql.rust.elements.Attr
|
||||
import codeql.rust.elements.Expr
|
||||
import codeql.rust.elements.FunctionOrMethodCallExpr
|
||||
|
||||
/**
|
||||
* A function call expression. For example:
|
||||
|
||||
14
rust/ql/lib/codeql/rust/elements/FunctionOrMethodCallExpr.qll
generated
Normal file
14
rust/ql/lib/codeql/rust/elements/FunctionOrMethodCallExpr.qll
generated
Normal file
@@ -0,0 +1,14 @@
|
||||
// generated by codegen, do not edit
|
||||
/**
|
||||
* This module provides the public class `FunctionOrMethodCallExpr`.
|
||||
*/
|
||||
|
||||
private import internal.FunctionOrMethodCallExprImpl
|
||||
import codeql.rust.elements.ArgList
|
||||
import codeql.rust.elements.Attr
|
||||
import codeql.rust.elements.Expr
|
||||
|
||||
/**
|
||||
* A function or method call expression. See `CallExpr` and `MethodCallExpr` for further details.
|
||||
*/
|
||||
final class FunctionOrMethodCallExpr = Impl::FunctionOrMethodCallExpr;
|
||||
@@ -4,9 +4,8 @@
|
||||
*/
|
||||
|
||||
private import internal.MethodCallExprImpl
|
||||
import codeql.rust.elements.ArgList
|
||||
import codeql.rust.elements.Attr
|
||||
import codeql.rust.elements.Expr
|
||||
import codeql.rust.elements.FunctionOrMethodCallExpr
|
||||
import codeql.rust.elements.GenericArgList
|
||||
import codeql.rust.elements.NameRef
|
||||
|
||||
|
||||
19
rust/ql/lib/codeql/rust/elements/internal/FunctionOrMethodCallExprImpl.qll
generated
Normal file
19
rust/ql/lib/codeql/rust/elements/internal/FunctionOrMethodCallExprImpl.qll
generated
Normal file
@@ -0,0 +1,19 @@
|
||||
// generated by codegen, remove this comment if you wish to edit this file
|
||||
/**
|
||||
* This module provides a hand-modifiable wrapper around the generated class `FunctionOrMethodCallExpr`.
|
||||
*
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
|
||||
private import codeql.rust.elements.internal.generated.FunctionOrMethodCallExpr
|
||||
|
||||
/**
|
||||
* INTERNAL: This module contains the customizable definition of `FunctionOrMethodCallExpr` and should not
|
||||
* be referenced directly.
|
||||
*/
|
||||
module Impl {
|
||||
/**
|
||||
* A function or method call expression. See `CallExpr` and `MethodCallExpr` for further details.
|
||||
*/
|
||||
class FunctionOrMethodCallExpr extends Generated::FunctionOrMethodCallExpr { }
|
||||
}
|
||||
@@ -6,10 +6,8 @@
|
||||
|
||||
private import codeql.rust.elements.internal.generated.Synth
|
||||
private import codeql.rust.elements.internal.generated.Raw
|
||||
import codeql.rust.elements.ArgList
|
||||
import codeql.rust.elements.Attr
|
||||
import codeql.rust.elements.Expr
|
||||
import codeql.rust.elements.internal.ExprImpl::Impl as ExprImpl
|
||||
import codeql.rust.elements.internal.FunctionOrMethodCallExprImpl::Impl as FunctionOrMethodCallExprImpl
|
||||
|
||||
/**
|
||||
* INTERNAL: This module contains the fully generated definition of `CallExpr` and should not
|
||||
@@ -27,40 +25,9 @@ module Generated {
|
||||
* INTERNAL: Do not reference the `Generated::CallExpr` class directly.
|
||||
* Use the subclass `CallExpr`, where the following predicates are available.
|
||||
*/
|
||||
class CallExpr extends Synth::TCallExpr, ExprImpl::Expr {
|
||||
class CallExpr extends Synth::TCallExpr, FunctionOrMethodCallExprImpl::FunctionOrMethodCallExpr {
|
||||
override string getAPrimaryQlClass() { result = "CallExpr" }
|
||||
|
||||
/**
|
||||
* Gets the argument list of this call expression, if it exists.
|
||||
*/
|
||||
ArgList getArgList() {
|
||||
result =
|
||||
Synth::convertArgListFromRaw(Synth::convertCallExprToRaw(this).(Raw::CallExpr).getArgList())
|
||||
}
|
||||
|
||||
/**
|
||||
* Holds if `getArgList()` exists.
|
||||
*/
|
||||
final predicate hasArgList() { exists(this.getArgList()) }
|
||||
|
||||
/**
|
||||
* Gets the `index`th attr of this call expression (0-based).
|
||||
*/
|
||||
Attr getAttr(int index) {
|
||||
result =
|
||||
Synth::convertAttrFromRaw(Synth::convertCallExprToRaw(this).(Raw::CallExpr).getAttr(index))
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets any of the attrs of this call expression.
|
||||
*/
|
||||
final Attr getAnAttr() { result = this.getAttr(_) }
|
||||
|
||||
/**
|
||||
* Gets the number of attrs of this call expression.
|
||||
*/
|
||||
final int getNumberOfAttrs() { result = count(int i | exists(this.getAttr(i))) }
|
||||
|
||||
/**
|
||||
* Gets the expression of this call expression, if it exists.
|
||||
*/
|
||||
|
||||
59
rust/ql/lib/codeql/rust/elements/internal/generated/FunctionOrMethodCallExpr.qll
generated
Normal file
59
rust/ql/lib/codeql/rust/elements/internal/generated/FunctionOrMethodCallExpr.qll
generated
Normal file
@@ -0,0 +1,59 @@
|
||||
// generated by codegen, do not edit
|
||||
/**
|
||||
* This module provides the generated definition of `FunctionOrMethodCallExpr`.
|
||||
* INTERNAL: Do not import directly.
|
||||
*/
|
||||
|
||||
private import codeql.rust.elements.internal.generated.Synth
|
||||
private import codeql.rust.elements.internal.generated.Raw
|
||||
import codeql.rust.elements.ArgList
|
||||
import codeql.rust.elements.Attr
|
||||
import codeql.rust.elements.internal.ExprImpl::Impl as ExprImpl
|
||||
|
||||
/**
|
||||
* INTERNAL: This module contains the fully generated definition of `FunctionOrMethodCallExpr` and should not
|
||||
* be referenced directly.
|
||||
*/
|
||||
module Generated {
|
||||
/**
|
||||
* A function or method call expression. See `CallExpr` and `MethodCallExpr` for further details.
|
||||
* INTERNAL: Do not reference the `Generated::FunctionOrMethodCallExpr` class directly.
|
||||
* Use the subclass `FunctionOrMethodCallExpr`, where the following predicates are available.
|
||||
*/
|
||||
class FunctionOrMethodCallExpr extends Synth::TFunctionOrMethodCallExpr, ExprImpl::Expr {
|
||||
/**
|
||||
* Gets the argument list of this function or method call expression, if it exists.
|
||||
*/
|
||||
ArgList getArgList() {
|
||||
result =
|
||||
Synth::convertArgListFromRaw(Synth::convertFunctionOrMethodCallExprToRaw(this)
|
||||
.(Raw::FunctionOrMethodCallExpr)
|
||||
.getArgList())
|
||||
}
|
||||
|
||||
/**
|
||||
* Holds if `getArgList()` exists.
|
||||
*/
|
||||
final predicate hasArgList() { exists(this.getArgList()) }
|
||||
|
||||
/**
|
||||
* Gets the `index`th attr of this function or method call expression (0-based).
|
||||
*/
|
||||
Attr getAttr(int index) {
|
||||
result =
|
||||
Synth::convertAttrFromRaw(Synth::convertFunctionOrMethodCallExprToRaw(this)
|
||||
.(Raw::FunctionOrMethodCallExpr)
|
||||
.getAttr(index))
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets any of the attrs of this function or method call expression.
|
||||
*/
|
||||
final Attr getAnAttr() { result = this.getAttr(_) }
|
||||
|
||||
/**
|
||||
* Gets the number of attrs of this function or method call expression.
|
||||
*/
|
||||
final int getNumberOfAttrs() { result = count(int i | exists(this.getAttr(i))) }
|
||||
}
|
||||
}
|
||||
@@ -6,10 +6,8 @@
|
||||
|
||||
private import codeql.rust.elements.internal.generated.Synth
|
||||
private import codeql.rust.elements.internal.generated.Raw
|
||||
import codeql.rust.elements.ArgList
|
||||
import codeql.rust.elements.Attr
|
||||
import codeql.rust.elements.Expr
|
||||
import codeql.rust.elements.internal.ExprImpl::Impl as ExprImpl
|
||||
import codeql.rust.elements.internal.FunctionOrMethodCallExprImpl::Impl as FunctionOrMethodCallExprImpl
|
||||
import codeql.rust.elements.GenericArgList
|
||||
import codeql.rust.elements.NameRef
|
||||
|
||||
@@ -27,44 +25,11 @@ module Generated {
|
||||
* INTERNAL: Do not reference the `Generated::MethodCallExpr` class directly.
|
||||
* Use the subclass `MethodCallExpr`, where the following predicates are available.
|
||||
*/
|
||||
class MethodCallExpr extends Synth::TMethodCallExpr, ExprImpl::Expr {
|
||||
class MethodCallExpr extends Synth::TMethodCallExpr,
|
||||
FunctionOrMethodCallExprImpl::FunctionOrMethodCallExpr
|
||||
{
|
||||
override string getAPrimaryQlClass() { result = "MethodCallExpr" }
|
||||
|
||||
/**
|
||||
* Gets the argument list of this method call expression, if it exists.
|
||||
*/
|
||||
ArgList getArgList() {
|
||||
result =
|
||||
Synth::convertArgListFromRaw(Synth::convertMethodCallExprToRaw(this)
|
||||
.(Raw::MethodCallExpr)
|
||||
.getArgList())
|
||||
}
|
||||
|
||||
/**
|
||||
* Holds if `getArgList()` exists.
|
||||
*/
|
||||
final predicate hasArgList() { exists(this.getArgList()) }
|
||||
|
||||
/**
|
||||
* Gets the `index`th attr of this method call expression (0-based).
|
||||
*/
|
||||
Attr getAttr(int index) {
|
||||
result =
|
||||
Synth::convertAttrFromRaw(Synth::convertMethodCallExprToRaw(this)
|
||||
.(Raw::MethodCallExpr)
|
||||
.getAttr(index))
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets any of the attrs of this method call expression.
|
||||
*/
|
||||
final Attr getAnAttr() { result = this.getAttr(_) }
|
||||
|
||||
/**
|
||||
* Gets the number of attrs of this method call expression.
|
||||
*/
|
||||
final int getNumberOfAttrs() { result = count(int i | exists(this.getAttr(i))) }
|
||||
|
||||
/**
|
||||
* Gets the generic argument list of this method call expression, if it exists.
|
||||
*/
|
||||
|
||||
@@ -1380,29 +1380,6 @@ private module Impl {
|
||||
)
|
||||
}
|
||||
|
||||
private Element getImmediateChildOfCallExpr(CallExpr e, int index, string partialPredicateCall) {
|
||||
exists(int b, int bExpr, int n, int nArgList, int nAttr, int nExpr |
|
||||
b = 0 and
|
||||
bExpr = b + 1 + max(int i | i = -1 or exists(getImmediateChildOfExpr(e, i, _)) | i) and
|
||||
n = bExpr and
|
||||
nArgList = n + 1 and
|
||||
nAttr = nArgList + 1 + max(int i | i = -1 or exists(e.getAttr(i)) | i) and
|
||||
nExpr = nAttr + 1 and
|
||||
(
|
||||
none()
|
||||
or
|
||||
result = getImmediateChildOfExpr(e, index - b, partialPredicateCall)
|
||||
or
|
||||
index = n and result = e.getArgList() and partialPredicateCall = "ArgList()"
|
||||
or
|
||||
result = e.getAttr(index - nArgList) and
|
||||
partialPredicateCall = "Attr(" + (index - nArgList).toString() + ")"
|
||||
or
|
||||
index = nAttr and result = e.getExpr() and partialPredicateCall = "Expr()"
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
private Element getImmediateChildOfCastExpr(CastExpr e, int index, string partialPredicateCall) {
|
||||
exists(int b, int bExpr, int n, int nAttr, int nExpr, int nTy |
|
||||
b = 0 and
|
||||
@@ -1714,6 +1691,28 @@ private module Impl {
|
||||
)
|
||||
}
|
||||
|
||||
private Element getImmediateChildOfFunctionOrMethodCallExpr(
|
||||
FunctionOrMethodCallExpr e, int index, string partialPredicateCall
|
||||
) {
|
||||
exists(int b, int bExpr, int n, int nArgList, int nAttr |
|
||||
b = 0 and
|
||||
bExpr = b + 1 + max(int i | i = -1 or exists(getImmediateChildOfExpr(e, i, _)) | i) and
|
||||
n = bExpr and
|
||||
nArgList = n + 1 and
|
||||
nAttr = nArgList + 1 + max(int i | i = -1 or exists(e.getAttr(i)) | i) and
|
||||
(
|
||||
none()
|
||||
or
|
||||
result = getImmediateChildOfExpr(e, index - b, partialPredicateCall)
|
||||
or
|
||||
index = n and result = e.getArgList() and partialPredicateCall = "ArgList()"
|
||||
or
|
||||
result = e.getAttr(index - nArgList) and
|
||||
partialPredicateCall = "Attr(" + (index - nArgList).toString() + ")"
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
private Element getImmediateChildOfIdentPat(IdentPat e, int index, string partialPredicateCall) {
|
||||
exists(int b, int bPat, int n, int nAttr, int nName, int nPat |
|
||||
b = 0 and
|
||||
@@ -2058,42 +2057,6 @@ private module Impl {
|
||||
)
|
||||
}
|
||||
|
||||
private Element getImmediateChildOfMethodCallExpr(
|
||||
MethodCallExpr e, int index, string partialPredicateCall
|
||||
) {
|
||||
exists(
|
||||
int b, int bExpr, int n, int nArgList, int nAttr, int nGenericArgList, int nNameRef,
|
||||
int nReceiver
|
||||
|
|
||||
b = 0 and
|
||||
bExpr = b + 1 + max(int i | i = -1 or exists(getImmediateChildOfExpr(e, i, _)) | i) and
|
||||
n = bExpr and
|
||||
nArgList = n + 1 and
|
||||
nAttr = nArgList + 1 + max(int i | i = -1 or exists(e.getAttr(i)) | i) and
|
||||
nGenericArgList = nAttr + 1 and
|
||||
nNameRef = nGenericArgList + 1 and
|
||||
nReceiver = nNameRef + 1 and
|
||||
(
|
||||
none()
|
||||
or
|
||||
result = getImmediateChildOfExpr(e, index - b, partialPredicateCall)
|
||||
or
|
||||
index = n and result = e.getArgList() and partialPredicateCall = "ArgList()"
|
||||
or
|
||||
result = e.getAttr(index - nArgList) and
|
||||
partialPredicateCall = "Attr(" + (index - nArgList).toString() + ")"
|
||||
or
|
||||
index = nAttr and
|
||||
result = e.getGenericArgList() and
|
||||
partialPredicateCall = "GenericArgList()"
|
||||
or
|
||||
index = nGenericArgList and result = e.getNameRef() and partialPredicateCall = "NameRef()"
|
||||
or
|
||||
index = nNameRef and result = e.getReceiver() and partialPredicateCall = "Receiver()"
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
private Element getImmediateChildOfNeverType(NeverType e, int index, string partialPredicateCall) {
|
||||
exists(int b, int bTypeRef, int n |
|
||||
b = 0 and
|
||||
@@ -2780,6 +2743,24 @@ private module Impl {
|
||||
)
|
||||
}
|
||||
|
||||
private Element getImmediateChildOfCallExpr(CallExpr e, int index, string partialPredicateCall) {
|
||||
exists(int b, int bFunctionOrMethodCallExpr, int n, int nExpr |
|
||||
b = 0 and
|
||||
bFunctionOrMethodCallExpr =
|
||||
b + 1 +
|
||||
max(int i | i = -1 or exists(getImmediateChildOfFunctionOrMethodCallExpr(e, i, _)) | i) and
|
||||
n = bFunctionOrMethodCallExpr and
|
||||
nExpr = n + 1 and
|
||||
(
|
||||
none()
|
||||
or
|
||||
result = getImmediateChildOfFunctionOrMethodCallExpr(e, index - b, partialPredicateCall)
|
||||
or
|
||||
index = n and result = e.getExpr() and partialPredicateCall = "Expr()"
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
private Element getImmediateChildOfConst(Const e, int index, string partialPredicateCall) {
|
||||
exists(
|
||||
int b, int bAssocItem, int bItem, int n, int nAttr, int nBody, int nName, int nTy,
|
||||
@@ -3096,6 +3077,34 @@ private module Impl {
|
||||
)
|
||||
}
|
||||
|
||||
private Element getImmediateChildOfMethodCallExpr(
|
||||
MethodCallExpr e, int index, string partialPredicateCall
|
||||
) {
|
||||
exists(
|
||||
int b, int bFunctionOrMethodCallExpr, int n, int nGenericArgList, int nNameRef, int nReceiver
|
||||
|
|
||||
b = 0 and
|
||||
bFunctionOrMethodCallExpr =
|
||||
b + 1 +
|
||||
max(int i | i = -1 or exists(getImmediateChildOfFunctionOrMethodCallExpr(e, i, _)) | i) and
|
||||
n = bFunctionOrMethodCallExpr and
|
||||
nGenericArgList = n + 1 and
|
||||
nNameRef = nGenericArgList + 1 and
|
||||
nReceiver = nNameRef + 1 and
|
||||
(
|
||||
none()
|
||||
or
|
||||
result = getImmediateChildOfFunctionOrMethodCallExpr(e, index - b, partialPredicateCall)
|
||||
or
|
||||
index = n and result = e.getGenericArgList() and partialPredicateCall = "GenericArgList()"
|
||||
or
|
||||
index = nGenericArgList and result = e.getNameRef() and partialPredicateCall = "NameRef()"
|
||||
or
|
||||
index = nNameRef and result = e.getReceiver() and partialPredicateCall = "Receiver()"
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
private Element getImmediateChildOfModule(Module e, int index, string partialPredicateCall) {
|
||||
exists(int b, int bItem, int n, int nAttr, int nItemList, int nName, int nVisibility |
|
||||
b = 0 and
|
||||
@@ -3519,8 +3528,6 @@ private module Impl {
|
||||
or
|
||||
result = getImmediateChildOfBreakExpr(e, index, partialAccessor)
|
||||
or
|
||||
result = getImmediateChildOfCallExpr(e, index, partialAccessor)
|
||||
or
|
||||
result = getImmediateChildOfCastExpr(e, index, partialAccessor)
|
||||
or
|
||||
result = getImmediateChildOfClosureExpr(e, index, partialAccessor)
|
||||
@@ -3581,8 +3588,6 @@ private module Impl {
|
||||
or
|
||||
result = getImmediateChildOfMatchExpr(e, index, partialAccessor)
|
||||
or
|
||||
result = getImmediateChildOfMethodCallExpr(e, index, partialAccessor)
|
||||
or
|
||||
result = getImmediateChildOfNeverType(e, index, partialAccessor)
|
||||
or
|
||||
result = getImmediateChildOfOffsetOfExpr(e, index, partialAccessor)
|
||||
@@ -3655,6 +3660,8 @@ private module Impl {
|
||||
or
|
||||
result = getImmediateChildOfYieldExpr(e, index, partialAccessor)
|
||||
or
|
||||
result = getImmediateChildOfCallExpr(e, index, partialAccessor)
|
||||
or
|
||||
result = getImmediateChildOfConst(e, index, partialAccessor)
|
||||
or
|
||||
result = getImmediateChildOfEnum(e, index, partialAccessor)
|
||||
@@ -3673,6 +3680,8 @@ private module Impl {
|
||||
or
|
||||
result = getImmediateChildOfMacroRules(e, index, partialAccessor)
|
||||
or
|
||||
result = getImmediateChildOfMethodCallExpr(e, index, partialAccessor)
|
||||
or
|
||||
result = getImmediateChildOfModule(e, index, partialAccessor)
|
||||
or
|
||||
result = getImmediateChildOfStatic(e, index, partialAccessor)
|
||||
|
||||
@@ -1395,35 +1395,6 @@ module Raw {
|
||||
Lifetime getLifetime() { break_expr_lifetimes(this, result) }
|
||||
}
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
* A function call expression. For example:
|
||||
* ```rust
|
||||
* foo(42);
|
||||
* foo::<u32, u64>(42);
|
||||
* foo[0](42);
|
||||
* foo(1) = 4;
|
||||
* ```
|
||||
*/
|
||||
class CallExpr extends @call_expr, Expr {
|
||||
override string toString() { result = "CallExpr" }
|
||||
|
||||
/**
|
||||
* Gets the argument list of this call expression, if it exists.
|
||||
*/
|
||||
ArgList getArgList() { call_expr_arg_lists(this, result) }
|
||||
|
||||
/**
|
||||
* Gets the `index`th attr of this call expression (0-based).
|
||||
*/
|
||||
Attr getAttr(int index) { call_expr_attrs(this, index, result) }
|
||||
|
||||
/**
|
||||
* Gets the expression of this call expression, if it exists.
|
||||
*/
|
||||
Expr getExpr() { call_expr_exprs(this, result) }
|
||||
}
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
* A cast expression. For example:
|
||||
@@ -1781,6 +1752,22 @@ module Raw {
|
||||
Expr getTemplate() { format_args_expr_templates(this, result) }
|
||||
}
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
* A function or method call expression. See `CallExpr` and `MethodCallExpr` for further details.
|
||||
*/
|
||||
class FunctionOrMethodCallExpr extends @function_or_method_call_expr, Expr {
|
||||
/**
|
||||
* Gets the argument list of this function or method call expression, if it exists.
|
||||
*/
|
||||
ArgList getArgList() { function_or_method_call_expr_arg_lists(this, result) }
|
||||
|
||||
/**
|
||||
* Gets the `index`th attr of this function or method call expression (0-based).
|
||||
*/
|
||||
Attr getAttr(int index) { function_or_method_call_expr_attrs(this, index, result) }
|
||||
}
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
* A binding pattern. For example:
|
||||
@@ -2206,43 +2193,6 @@ module Raw {
|
||||
MatchArmList getMatchArmList() { match_expr_match_arm_lists(this, result) }
|
||||
}
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
* A method call expression. For example:
|
||||
* ```rust
|
||||
* x.foo(42);
|
||||
* x.foo::<u32, u64>(42);
|
||||
* ```
|
||||
*/
|
||||
class MethodCallExpr extends @method_call_expr, Expr {
|
||||
override string toString() { result = "MethodCallExpr" }
|
||||
|
||||
/**
|
||||
* Gets the argument list of this method call expression, if it exists.
|
||||
*/
|
||||
ArgList getArgList() { method_call_expr_arg_lists(this, result) }
|
||||
|
||||
/**
|
||||
* Gets the `index`th attr of this method call expression (0-based).
|
||||
*/
|
||||
Attr getAttr(int index) { method_call_expr_attrs(this, index, result) }
|
||||
|
||||
/**
|
||||
* Gets the generic argument list of this method call expression, if it exists.
|
||||
*/
|
||||
GenericArgList getGenericArgList() { method_call_expr_generic_arg_lists(this, result) }
|
||||
|
||||
/**
|
||||
* Gets the name reference of this method call expression, if it exists.
|
||||
*/
|
||||
NameRef getNameRef() { method_call_expr_name_refs(this, result) }
|
||||
|
||||
/**
|
||||
* Gets the receiver of this method call expression, if it exists.
|
||||
*/
|
||||
Expr getReceiver() { method_call_expr_receivers(this, result) }
|
||||
}
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
* A NeverType. For example:
|
||||
@@ -2999,6 +2949,25 @@ module Raw {
|
||||
Expr getExpr() { yield_expr_exprs(this, result) }
|
||||
}
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
* A function call expression. For example:
|
||||
* ```rust
|
||||
* foo(42);
|
||||
* foo::<u32, u64>(42);
|
||||
* foo[0](42);
|
||||
* foo(1) = 4;
|
||||
* ```
|
||||
*/
|
||||
class CallExpr extends @call_expr, FunctionOrMethodCallExpr {
|
||||
override string toString() { result = "CallExpr" }
|
||||
|
||||
/**
|
||||
* Gets the expression of this call expression, if it exists.
|
||||
*/
|
||||
Expr getExpr() { call_expr_exprs(this, result) }
|
||||
}
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
* A Const. For example:
|
||||
@@ -3334,6 +3303,33 @@ module Raw {
|
||||
Visibility getVisibility() { macro_rules_visibilities(this, result) }
|
||||
}
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
* A method call expression. For example:
|
||||
* ```rust
|
||||
* x.foo(42);
|
||||
* x.foo::<u32, u64>(42);
|
||||
* ```
|
||||
*/
|
||||
class MethodCallExpr extends @method_call_expr, FunctionOrMethodCallExpr {
|
||||
override string toString() { result = "MethodCallExpr" }
|
||||
|
||||
/**
|
||||
* Gets the generic argument list of this method call expression, if it exists.
|
||||
*/
|
||||
GenericArgList getGenericArgList() { method_call_expr_generic_arg_lists(this, result) }
|
||||
|
||||
/**
|
||||
* Gets the name reference of this method call expression, if it exists.
|
||||
*/
|
||||
NameRef getNameRef() { method_call_expr_name_refs(this, result) }
|
||||
|
||||
/**
|
||||
* Gets the receiver of this method call expression, if it exists.
|
||||
*/
|
||||
Expr getReceiver() { method_call_expr_receivers(this, result) }
|
||||
}
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
* A module declaration. For example:
|
||||
|
||||
@@ -608,9 +608,9 @@ module Synth {
|
||||
*/
|
||||
class TExpr =
|
||||
TArrayExpr or TAsmExpr or TAwaitExpr or TBecomeExpr or TBinaryExpr or TBlockExpr or
|
||||
TBreakExpr or TCallExpr or TCastExpr or TClosureExpr or TContinueExpr or TFieldExpr or
|
||||
TForExpr or TFormatArgsExpr or TIfExpr or TIndexExpr or TLetExpr or TLiteralExpr or
|
||||
TLoopExpr or TMacroExpr or TMatchExpr or TMethodCallExpr or TOffsetOfExpr or TParenExpr or
|
||||
TBreakExpr or TCastExpr or TClosureExpr or TContinueExpr or TFieldExpr or TForExpr or
|
||||
TFormatArgsExpr or TFunctionOrMethodCallExpr or TIfExpr or TIndexExpr or TLetExpr or
|
||||
TLiteralExpr or TLoopExpr or TMacroExpr or TMatchExpr or TOffsetOfExpr or TParenExpr or
|
||||
TPathExpr or TPrefixExpr or TRangeExpr or TRecordExpr or TRefExpr or TReturnExpr or
|
||||
TTryExpr or TTupleExpr or TUnderscoreExpr or TWhileExpr or TYeetExpr or TYieldExpr;
|
||||
|
||||
@@ -624,6 +624,11 @@ module Synth {
|
||||
*/
|
||||
class TFieldList = TRecordFieldList or TTupleFieldList;
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
class TFunctionOrMethodCallExpr = TCallExpr or TMethodCallExpr;
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
*/
|
||||
@@ -1693,8 +1698,6 @@ module Synth {
|
||||
or
|
||||
result = convertBreakExprFromRaw(e)
|
||||
or
|
||||
result = convertCallExprFromRaw(e)
|
||||
or
|
||||
result = convertCastExprFromRaw(e)
|
||||
or
|
||||
result = convertClosureExprFromRaw(e)
|
||||
@@ -1707,6 +1710,8 @@ module Synth {
|
||||
or
|
||||
result = convertFormatArgsExprFromRaw(e)
|
||||
or
|
||||
result = convertFunctionOrMethodCallExprFromRaw(e)
|
||||
or
|
||||
result = convertIfExprFromRaw(e)
|
||||
or
|
||||
result = convertIndexExprFromRaw(e)
|
||||
@@ -1721,8 +1726,6 @@ module Synth {
|
||||
or
|
||||
result = convertMatchExprFromRaw(e)
|
||||
or
|
||||
result = convertMethodCallExprFromRaw(e)
|
||||
or
|
||||
result = convertOffsetOfExprFromRaw(e)
|
||||
or
|
||||
result = convertParenExprFromRaw(e)
|
||||
@@ -1776,6 +1779,16 @@ module Synth {
|
||||
result = convertTupleFieldListFromRaw(e)
|
||||
}
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
* Converts a raw DB element to a synthesized `TFunctionOrMethodCallExpr`, if possible.
|
||||
*/
|
||||
TFunctionOrMethodCallExpr convertFunctionOrMethodCallExprFromRaw(Raw::Element e) {
|
||||
result = convertCallExprFromRaw(e)
|
||||
or
|
||||
result = convertMethodCallExprFromRaw(e)
|
||||
}
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
* Converts a raw DB element to a synthesized `TGenericArg`, if possible.
|
||||
@@ -2963,8 +2976,6 @@ module Synth {
|
||||
or
|
||||
result = convertBreakExprToRaw(e)
|
||||
or
|
||||
result = convertCallExprToRaw(e)
|
||||
or
|
||||
result = convertCastExprToRaw(e)
|
||||
or
|
||||
result = convertClosureExprToRaw(e)
|
||||
@@ -2977,6 +2988,8 @@ module Synth {
|
||||
or
|
||||
result = convertFormatArgsExprToRaw(e)
|
||||
or
|
||||
result = convertFunctionOrMethodCallExprToRaw(e)
|
||||
or
|
||||
result = convertIfExprToRaw(e)
|
||||
or
|
||||
result = convertIndexExprToRaw(e)
|
||||
@@ -2991,8 +3004,6 @@ module Synth {
|
||||
or
|
||||
result = convertMatchExprToRaw(e)
|
||||
or
|
||||
result = convertMethodCallExprToRaw(e)
|
||||
or
|
||||
result = convertOffsetOfExprToRaw(e)
|
||||
or
|
||||
result = convertParenExprToRaw(e)
|
||||
@@ -3046,6 +3057,16 @@ module Synth {
|
||||
result = convertTupleFieldListToRaw(e)
|
||||
}
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
* Converts a synthesized `TFunctionOrMethodCallExpr` to a raw DB element, if possible.
|
||||
*/
|
||||
Raw::Element convertFunctionOrMethodCallExprToRaw(TFunctionOrMethodCallExpr e) {
|
||||
result = convertCallExprToRaw(e)
|
||||
or
|
||||
result = convertMethodCallExprToRaw(e)
|
||||
}
|
||||
|
||||
/**
|
||||
* INTERNAL: Do not use.
|
||||
* Converts a synthesized `TGenericArg` to a raw DB element, if possible.
|
||||
|
||||
@@ -273,13 +273,13 @@ closure_binder_generic_param_lists(
|
||||
| @binary_expr
|
||||
| @block_expr
|
||||
| @break_expr
|
||||
| @call_expr
|
||||
| @cast_expr
|
||||
| @closure_expr
|
||||
| @continue_expr
|
||||
| @field_expr
|
||||
| @for_expr
|
||||
| @format_args_expr
|
||||
| @function_or_method_call_expr
|
||||
| @if_expr
|
||||
| @index_expr
|
||||
| @let_expr
|
||||
@@ -287,7 +287,6 @@ closure_binder_generic_param_lists(
|
||||
| @loop_expr
|
||||
| @macro_expr
|
||||
| @match_expr
|
||||
| @method_call_expr
|
||||
| @offset_of_expr
|
||||
| @paren_expr
|
||||
| @path_expr
|
||||
@@ -1301,29 +1300,6 @@ break_expr_lifetimes(
|
||||
int lifetime: @lifetime ref
|
||||
);
|
||||
|
||||
call_exprs(
|
||||
unique int id: @call_expr
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
call_expr_arg_lists(
|
||||
int id: @call_expr ref,
|
||||
int arg_list: @arg_list ref
|
||||
);
|
||||
|
||||
#keyset[id, index]
|
||||
call_expr_attrs(
|
||||
int id: @call_expr ref,
|
||||
int index: int ref,
|
||||
int attr: @attr ref
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
call_expr_exprs(
|
||||
int id: @call_expr ref,
|
||||
int expr: @expr ref
|
||||
);
|
||||
|
||||
cast_exprs(
|
||||
unique int id: @cast_expr
|
||||
);
|
||||
@@ -1594,6 +1570,24 @@ format_args_expr_templates(
|
||||
int template: @expr ref
|
||||
);
|
||||
|
||||
@function_or_method_call_expr =
|
||||
@call_expr
|
||||
| @method_call_expr
|
||||
;
|
||||
|
||||
#keyset[id]
|
||||
function_or_method_call_expr_arg_lists(
|
||||
int id: @function_or_method_call_expr ref,
|
||||
int arg_list: @arg_list ref
|
||||
);
|
||||
|
||||
#keyset[id, index]
|
||||
function_or_method_call_expr_attrs(
|
||||
int id: @function_or_method_call_expr ref,
|
||||
int index: int ref,
|
||||
int attr: @attr ref
|
||||
);
|
||||
|
||||
ident_pats(
|
||||
unique int id: @ident_pat
|
||||
);
|
||||
@@ -1897,41 +1891,6 @@ match_expr_match_arm_lists(
|
||||
int match_arm_list: @match_arm_list ref
|
||||
);
|
||||
|
||||
method_call_exprs(
|
||||
unique int id: @method_call_expr
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
method_call_expr_arg_lists(
|
||||
int id: @method_call_expr ref,
|
||||
int arg_list: @arg_list ref
|
||||
);
|
||||
|
||||
#keyset[id, index]
|
||||
method_call_expr_attrs(
|
||||
int id: @method_call_expr ref,
|
||||
int index: int ref,
|
||||
int attr: @attr ref
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
method_call_expr_generic_arg_lists(
|
||||
int id: @method_call_expr ref,
|
||||
int generic_arg_list: @generic_arg_list ref
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
method_call_expr_name_refs(
|
||||
int id: @method_call_expr ref,
|
||||
int name_ref: @name_ref ref
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
method_call_expr_receivers(
|
||||
int id: @method_call_expr ref,
|
||||
int receiver: @expr ref
|
||||
);
|
||||
|
||||
never_types(
|
||||
unique int id: @never_type
|
||||
);
|
||||
@@ -2466,6 +2425,16 @@ yield_expr_exprs(
|
||||
int expr: @expr ref
|
||||
);
|
||||
|
||||
call_exprs(
|
||||
unique int id: @call_expr
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
call_expr_exprs(
|
||||
int id: @call_expr ref,
|
||||
int expr: @expr ref
|
||||
);
|
||||
|
||||
consts(
|
||||
unique int id: @const
|
||||
);
|
||||
@@ -2787,6 +2756,28 @@ macro_rules_visibilities(
|
||||
int visibility: @visibility ref
|
||||
);
|
||||
|
||||
method_call_exprs(
|
||||
unique int id: @method_call_expr
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
method_call_expr_generic_arg_lists(
|
||||
int id: @method_call_expr ref,
|
||||
int generic_arg_list: @generic_arg_list ref
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
method_call_expr_name_refs(
|
||||
int id: @method_call_expr ref,
|
||||
int name_ref: @name_ref ref
|
||||
);
|
||||
|
||||
#keyset[id]
|
||||
method_call_expr_receivers(
|
||||
int id: @method_call_expr ref,
|
||||
int receiver: @expr ref
|
||||
);
|
||||
|
||||
modules(
|
||||
unique int id: @module
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user