mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
Rust: separate attribute macro and macro call expansions
This commit is contained in:
@@ -1164,7 +1164,7 @@ class _:
|
||||
"""
|
||||
|
||||
|
||||
@annotate(Item)
|
||||
@annotate(Item, add_bases=(Addressable,))
|
||||
class _:
|
||||
"""
|
||||
A Item. For example:
|
||||
@@ -1172,6 +1172,7 @@ class _:
|
||||
todo!()
|
||||
```
|
||||
"""
|
||||
attribute_macro_expansion: optional[MacroItems] | child | rust.detach
|
||||
|
||||
|
||||
@annotate(ItemList)
|
||||
@@ -1232,6 +1233,7 @@ class _:
|
||||
todo!()
|
||||
```
|
||||
"""
|
||||
macro_call_expansion: optional[AstNode] | child | rust.detach
|
||||
|
||||
|
||||
@annotate(MacroDef)
|
||||
@@ -1258,10 +1260,18 @@ class _:
|
||||
@rust.doc_test_signature(None)
|
||||
class _:
|
||||
"""
|
||||
A sequence of items generated by a `MacroCall`. For example:
|
||||
A sequence of items generated by a macro. For example:
|
||||
```rust
|
||||
mod foo{
|
||||
include!("common_definitions.rs");
|
||||
|
||||
#[an_attribute_macro]
|
||||
fn foo() {
|
||||
println!("Hello, world!");
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
struct Bar;
|
||||
}
|
||||
```
|
||||
"""
|
||||
@@ -1940,8 +1950,3 @@ class FormatArgument(Locatable):
|
||||
"""
|
||||
parent: Format
|
||||
variable: optional[FormatTemplateVariableAccess] | child
|
||||
|
||||
|
||||
@annotate(Item, add_bases=(Addressable,))
|
||||
class _:
|
||||
expanded: optional[AstNode] | child | rust.detach | doc("expanded attribute or procedural macro call of this item")
|
||||
|
||||
Reference in New Issue
Block a user