aboutsummaryrefslogtreecommitdiff
path: root/xtask/src/codegen/gen_parser_tests.rs
diff options
context:
space:
mode:
Diffstat (limited to 'xtask/src/codegen/gen_parser_tests.rs')
-rw-r--r--xtask/src/codegen/gen_parser_tests.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/xtask/src/codegen/gen_parser_tests.rs b/xtask/src/codegen/gen_parser_tests.rs
index 2977da2fa..96fdd9216 100644
--- a/xtask/src/codegen/gen_parser_tests.rs
+++ b/xtask/src/codegen/gen_parser_tests.rs
@@ -8,12 +8,12 @@ use std::{
8}; 8};
9 9
10use crate::{ 10use crate::{
11 codegen::{self, extract_comment_blocks, update, Mode}, 11 codegen::{extract_comment_blocks, update, Mode},
12 project_root, Result, 12 project_root, Result,
13}; 13};
14 14
15pub fn generate_parser_tests(mode: Mode) -> Result<()> { 15pub fn generate_parser_tests(mode: Mode) -> Result<()> {
16 let tests = tests_from_dir(&project_root().join(Path::new(codegen::GRAMMAR_DIR)))?; 16 let tests = tests_from_dir(&project_root().join(Path::new("crates/parser/src/grammar")))?;
17 fn install_tests(tests: &HashMap<String, Test>, into: &str, mode: Mode) -> Result<()> { 17 fn install_tests(tests: &HashMap<String, Test>, into: &str, mode: Mode) -> Result<()> {
18 let tests_dir = project_root().join(into); 18 let tests_dir = project_root().join(into);
19 if !tests_dir.is_dir() { 19 if !tests_dir.is_dir() {
@@ -39,8 +39,8 @@ pub fn generate_parser_tests(mode: Mode) -> Result<()> {
39 } 39 }
40 Ok(()) 40 Ok(())
41 } 41 }
42 install_tests(&tests.ok, codegen::OK_INLINE_TESTS_DIR, mode)?; 42 install_tests(&tests.ok, "crates/syntax/test_data/parser/inline/ok", mode)?;
43 install_tests(&tests.err, codegen::ERR_INLINE_TESTS_DIR, mode) 43 install_tests(&tests.err, "crates/syntax/test_data/parser/inline/err", mode)
44} 44}
45 45
46#[derive(Debug)] 46#[derive(Debug)]