Rust: add extended canonical paths on enum variants

This commit is contained in:
Paolo Tranquilli
2024-11-22 16:19:07 +01:00
parent 86c25d0396
commit f3cd61f043
28 changed files with 879 additions and 429 deletions

View File

@@ -73,6 +73,20 @@ class Callable(AstNode):
attrs: list["Attr"] | child
class Addressable(AstNode):
"""
Something that can be addressed by a path.
TODO: This does not yet include all possible cases.
"""
extended_canonical_path: optional[string] | desc("""
Either a canonical path (see https://doc.rust-lang.org/reference/paths.html#canonical-paths),
or `{<block id>}::name` for addressable items defined in an anonymous block (and only
addressable there-in).
""") | rust.detach | ql.internal
crate_origin: optional[string] | desc("One of `rustc:<name>`, `repo:<repository>:<name>` or `lang:<name>`.") | rust.detach | ql.internal
class Resolvable(AstNode):
"""
Either a `Path`, or a `MethodCallExpr`.