mirror of
https://github.com/ivuorinen/tree-sitter-shellspec.git
synced 2026-01-26 03:34:03 +00:00
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:
@@ -56,6 +56,18 @@
|
||||
"Todo"
|
||||
] @keyword.function.pending
|
||||
|
||||
; Block terminator
|
||||
[
|
||||
"End"
|
||||
] @keyword.control
|
||||
|
||||
; Data block modifiers
|
||||
[
|
||||
":raw"
|
||||
":expand"
|
||||
"#|"
|
||||
] @keyword.modifier
|
||||
|
||||
; Directives
|
||||
[
|
||||
"Include"
|
||||
|
||||
@@ -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)))))))
|
||||
|
||||
Reference in New Issue
Block a user