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.
107 lines
2.0 KiB
Plaintext
107 lines
2.0 KiB
Plaintext
==================
|
|
Basic schedule
|
|
==================
|
|
|
|
schedule WorkDay {
|
|
block morning {
|
|
08:00 -> 12:00
|
|
action: Work
|
|
}
|
|
}
|
|
|
|
---
|
|
|
|
(source_file
|
|
(declaration
|
|
(schedule_declaration
|
|
name: (identifier)
|
|
body: (schedule_body
|
|
(schedule_block
|
|
name: (identifier)
|
|
time_range: (time_range
|
|
start: (time)
|
|
end: (time))
|
|
(block_field
|
|
name: (identifier)
|
|
value: (identifier)))))))
|
|
|
|
==================
|
|
Schedule with modifies
|
|
==================
|
|
|
|
schedule BakerDay modifies WorkDay {
|
|
block early_prep {
|
|
05:00 -> 08:00
|
|
}
|
|
}
|
|
|
|
---
|
|
|
|
(source_file
|
|
(declaration
|
|
(schedule_declaration
|
|
name: (identifier)
|
|
modifies: (identifier)
|
|
body: (schedule_body
|
|
(schedule_block
|
|
name: (identifier)
|
|
time_range: (time_range
|
|
start: (time)
|
|
end: (time)))))))
|
|
|
|
==================
|
|
Schedule with override
|
|
==================
|
|
|
|
schedule CustomDay modifies BaseDay {
|
|
override work {
|
|
06:00 -> 14:00
|
|
intensity: "high"
|
|
}
|
|
}
|
|
|
|
---
|
|
|
|
(source_file
|
|
(declaration
|
|
(schedule_declaration
|
|
name: (identifier)
|
|
modifies: (identifier)
|
|
body: (schedule_body
|
|
(override_block
|
|
name: (identifier)
|
|
time_range: (time_range
|
|
start: (time)
|
|
end: (time))
|
|
(block_field
|
|
name: (identifier)
|
|
value: (string)))))))
|
|
|
|
==================
|
|
Schedule with recurrence
|
|
==================
|
|
|
|
schedule WeeklySchedule {
|
|
recurrence MarketDay on Saturday {
|
|
block market {
|
|
06:00 -> 14:00
|
|
}
|
|
}
|
|
}
|
|
|
|
---
|
|
|
|
(source_file
|
|
(declaration
|
|
(schedule_declaration
|
|
name: (identifier)
|
|
body: (schedule_body
|
|
(recurrence_block
|
|
name: (identifier)
|
|
day: (identifier)
|
|
(schedule_block
|
|
name: (identifier)
|
|
time_range: (time_range
|
|
start: (time)
|
|
end: (time))))))))
|