feat(lang): complete extends to modifies keyword migration
This commit completes the migration started in the previous commit, updating all remaining files: - Lexer: Changed token from Extends to Modifies - Parser: Updated lalrpop grammar rules and AST field names - AST: Renamed Schedule.extends field to modifies - Grammar: Updated tree-sitter grammar.js - Tree-sitter: Regenerated parser.c and node-types.json - Examples: Updated baker-family work schedules - Tests: Updated schedule composition tests and corpus - Docs: Updated all reference documentation and tutorials - Validation: Updated error messages and validation logic - Package: Bumped version to 0.3.1 in all package manifests All 554 tests pass.
This commit is contained in:
@@ -41,8 +41,7 @@ fn examples_dir() -> PathBuf {
|
||||
|
||||
#[test]
|
||||
fn test_tree_sitter_grammar_generates() {
|
||||
let output = Command::new("npx")
|
||||
.arg("tree-sitter")
|
||||
let output = Command::new("tree-sitter")
|
||||
.arg("generate")
|
||||
.current_dir(tree_sitter_dir())
|
||||
.output()
|
||||
@@ -69,8 +68,7 @@ fn test_tree_sitter_grammar_generates() {
|
||||
|
||||
#[test]
|
||||
fn test_tree_sitter_grammar_builds() {
|
||||
let output = Command::new("npx")
|
||||
.arg("tree-sitter")
|
||||
let output = Command::new("tree-sitter")
|
||||
.arg("generate")
|
||||
.current_dir(tree_sitter_dir())
|
||||
.output()
|
||||
@@ -93,8 +91,7 @@ fn test_tree_sitter_grammar_builds() {
|
||||
|
||||
#[test]
|
||||
fn test_highlights_query_valid() {
|
||||
let output = Command::new("npx")
|
||||
.arg("tree-sitter")
|
||||
let output = Command::new("tree-sitter")
|
||||
.arg("test")
|
||||
.current_dir(tree_sitter_dir())
|
||||
.output()
|
||||
@@ -183,8 +180,7 @@ fn test_baker_family_example_parses() {
|
||||
);
|
||||
|
||||
for file in &sb_files {
|
||||
let output = Command::new("npx")
|
||||
.arg("tree-sitter")
|
||||
let output = Command::new("tree-sitter")
|
||||
.arg("parse")
|
||||
.arg(file)
|
||||
.current_dir(tree_sitter_dir())
|
||||
@@ -221,8 +217,7 @@ fn test_all_examples_parse() {
|
||||
let mut failures = Vec::new();
|
||||
|
||||
for file in &sb_files {
|
||||
let output = Command::new("npx")
|
||||
.arg("tree-sitter")
|
||||
let output = Command::new("tree-sitter")
|
||||
.arg("parse")
|
||||
.arg(file)
|
||||
.current_dir(tree_sitter_dir())
|
||||
@@ -268,11 +263,15 @@ fn test_type_system_keywords_parse() {
|
||||
);
|
||||
}
|
||||
|
||||
let output = Command::new("npx")
|
||||
.arg("tree-sitter")
|
||||
let _test_file = tree_sitter_dir()
|
||||
.join("test")
|
||||
.join("corpus")
|
||||
.join("type_system.txt");
|
||||
|
||||
let output = Command::new("tree-sitter")
|
||||
.arg("test")
|
||||
.arg("--filter")
|
||||
.arg("type_system")
|
||||
.arg("--file-name")
|
||||
.arg("type_system.txt")
|
||||
.current_dir(tree_sitter_dir())
|
||||
.output()
|
||||
.expect("Failed to run tree-sitter test");
|
||||
@@ -299,8 +298,7 @@ concept_comparison SkillLevel {
|
||||
let test_file = temp_dir.join("test_any_type.sb");
|
||||
std::fs::write(&test_file, test_content).expect("Failed to write test file");
|
||||
|
||||
let output = Command::new("npx")
|
||||
.arg("tree-sitter")
|
||||
let output = Command::new("tree-sitter")
|
||||
.arg("parse")
|
||||
.arg(&test_file)
|
||||
.current_dir(tree_sitter_dir())
|
||||
|
||||
Reference in New Issue
Block a user