mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 21:05:02 +00:00
initial implementation
This commit is contained in:
parent
9b9fc135d6
commit
d14610dab4
3 changed files with 18 additions and 11 deletions
|
@ -12,9 +12,9 @@ pub use teraron::{Mode, Verify, Overwrite};
|
|||
|
||||
pub type Result<T> = ::std::result::Result<T, failure::Error>;
|
||||
|
||||
pub const GRAMMAR: &str = "ra_syntax/src/grammar.ron";
|
||||
pub const SYNTAX_KINDS: &str = "ra_syntax/src/syntax_kinds/generated.rs.tera";
|
||||
pub const AST: &str = "ra_syntax/src/ast/generated.rs.tera";
|
||||
pub const GRAMMAR: &str = "crates/ra_syntax/src/grammar.ron";
|
||||
pub const SYNTAX_KINDS: &str = "crates/ra_syntax/src/syntax_kinds/generated.rs.tera";
|
||||
pub const AST: &str = "crates/ra_syntax/src/ast/generated.rs.tera";
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct Test {
|
||||
|
@ -75,7 +75,8 @@ pub fn generate(mode: Mode) -> Result<()> {
|
|||
|
||||
pub fn project_root() -> PathBuf {
|
||||
Path::new(&std::env::var("CARGO_MANIFEST_DIR").unwrap())
|
||||
.parent()
|
||||
.ancestors()
|
||||
.nth(2)
|
||||
.unwrap()
|
||||
.to_path_buf()
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue