diff options
author | CohenArthur <arthur.cohen@epita.fr> | 2021-08-07 13:15:18 +0200 |
---|---|---|
committer | CohenArthur <arthur.cohen@epita.fr> | 2021-08-12 16:52:22 +0200 |
commit | 53756e1a01c7ac93e8467f577f50c491ca4b2525 (patch) | |
tree | 6258a77e9c1b17f8bc7a3a8705a1918ac2850ce8 /gcc/rust/backend/rust-compile-resolve-path.cc | |
parent | 7be0232c686a75f98b2ca3c27f7de3139b8999c6 (diff) | |
download | gcc-53756e1a01c7ac93e8467f577f50c491ca4b2525.zip gcc-53756e1a01c7ac93e8467f577f50c491ca4b2525.tar.gz gcc-53756e1a01c7ac93e8467f577f50c491ca4b2525.tar.bz2 |
lexer: Add function to get original filename
When parsing an external module, it is important to be able to access
the original "including" file in order to resolve the path of the
desired module. Take the following example
```rust
// /project/src/foo.rs
mod bar; /* External module */
```
The file which contains the `bar` module could be located at
`/project/src/bar.rs`, or at `/project/src/foo/bar.rs` (careful, this isn't an exhaustive list
of all possible cases). We must therefore be able to access the
`/project/src` directory in order to find valid candidates for `mod
bar`
Diffstat (limited to 'gcc/rust/backend/rust-compile-resolve-path.cc')
0 files changed, 0 insertions, 0 deletions