mirror of
https://github.com/github/codeql.git
synced 2025-12-16 16:53:25 +01:00
This works around a quirk in rust-analyzer's AST generation machinery, where for an `<X as Y>` path there might be no way to directly get `Y` from the path segment.
This crate takes care of generating ast.py in the schema and translate/generate.rs
in the extractor.
It uses:
rust.ungramfromra_ap_syntax- a couple of slightly modified sources from
rust-analyzerthat are not published.
Both are fetched by bazel while building. In order to have proper IDE support and being able to run cargo tooling in this crate, you can run
bazel run //rust/ast-generator:inject_sources
which will create the missing sources. Be aware that bazel will still use the source taken
directly from rust-analyzer, not the one in your working copy. Those should not need to be
update often though.