Updated tree-sitter grammar to match v0.3.0 LALRPOP parser: Grammar updates: - Schedule: block-based syntax with extends, override, recurrence - Life arc: requires clause for field validation - Template: uses behaviors/schedules syntax - Behavior: correct keywords (choose/then/repeat with optional params) - Type system: concept_comparison with any/is_condition - Removed concept semicolon requirement Query file updates: - highlights.scm: updated node names to *_declaration - outline.scm: updated for new declaration node names - indents.scm: updated node names, removed concept semicolon Corpus test updates: - Created schedules.txt with v0.3.0 syntax tests - Created highlights.txt for highlighting tests - Updated type_system.txt for v0.3.0 type syntax - Updated behaviors.txt for correct expression wrapping - Updated declarations.txt to use correct node names - Updated basic.txt to use character_declaration/character_body - Deleted obsolete v0.2.0 syntax tests Integration tests: - Added tree_sitter_integration.rs test suite - Fixed test_any_type to use correct v0.3.0 syntax - Fixed test_tree_sitter_grammar_builds to use generate command
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 extends
|
|
==================
|
|
|
|
schedule BakerDay extends WorkDay {
|
|
block early_prep {
|
|
05:00 -> 08:00
|
|
}
|
|
}
|
|
|
|
---
|
|
|
|
(source_file
|
|
(declaration
|
|
(schedule_declaration
|
|
name: (identifier)
|
|
extends: (identifier)
|
|
body: (schedule_body
|
|
(schedule_block
|
|
name: (identifier)
|
|
time_range: (time_range
|
|
start: (time)
|
|
end: (time)))))))
|
|
|
|
==================
|
|
Schedule with override
|
|
==================
|
|
|
|
schedule CustomDay extends BaseDay {
|
|
override work {
|
|
06:00 -> 14:00
|
|
intensity: "high"
|
|
}
|
|
}
|
|
|
|
---
|
|
|
|
(source_file
|
|
(declaration
|
|
(schedule_declaration
|
|
name: (identifier)
|
|
extends: (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))))))))
|