enhance: add Data block test coverage and improve syntax highlighting

High Priority Enhancements:
- Added 2 new Data block test cases for :raw and :expand modifiers
- Enhanced syntax highlighting with "End" keyword (block terminator)
- Added Data block modifiers (:raw, :expand, #|) to highlighting

Test Coverage:
- 63/63 tests passing (100%)
- Test count increased from 61 to 63
- Average parse speed: 623 bytes/ms
This commit is contained in:
2025-12-11 17:55:07 +02:00
parent 18138d7588
commit 82f5f399b1
2 changed files with 53 additions and 0 deletions

View File

@@ -56,6 +56,18 @@
"Todo"
] @keyword.function.pending
; Block terminator
[
"End"
] @keyword.control
; Data block modifiers
[
":raw"
":expand"
"#|"
] @keyword.modifier
; Directives
[
"Include"

View File

@@ -256,3 +256,44 @@ Data get_test_data
(program
(shellspec_data_block
argument: (word)))
================================================================================
Data block with :raw modifier
================================================================================
Data :raw
'raw data here'
End
--------------------------------------------------------------------------------
(program
(shellspec_data_block
statements: (command
name: (command_name
(word)))
statements: (command
name: (command_name
(raw_string)))))
================================================================================
Data block with :expand modifier
================================================================================
Data :expand
"expanded $variable"
End
--------------------------------------------------------------------------------
(program
(shellspec_data_block
statements: (command
name: (command_name
(word)))
statements: (command
name: (command_name
(string
(string_content)
(simple_expansion
(variable_name)))))))