mirror of
https://github.com/ivuorinen/tree-sitter-shellspec.git
synced 2026-02-18 09:53:25 +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"
|
"Todo"
|
||||||
] @keyword.function.pending
|
] @keyword.function.pending
|
||||||
|
|
||||||
|
; Block terminator
|
||||||
|
[
|
||||||
|
"End"
|
||||||
|
] @keyword.control
|
||||||
|
|
||||||
|
; Data block modifiers
|
||||||
|
[
|
||||||
|
":raw"
|
||||||
|
":expand"
|
||||||
|
"#|"
|
||||||
|
] @keyword.modifier
|
||||||
|
|
||||||
; Directives
|
; Directives
|
||||||
[
|
[
|
||||||
"Include"
|
"Include"
|
||||||
|
|||||||
@@ -256,3 +256,44 @@ Data get_test_data
|
|||||||
(program
|
(program
|
||||||
(shellspec_data_block
|
(shellspec_data_block
|
||||||
argument: (word)))
|
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