mirror of
https://github.com/ivuorinen/tree-sitter-shellspec.git
synced 2026-01-26 11:43:59 +00:00
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
98 lines
1.3 KiB
Scheme
98 lines
1.3 KiB
Scheme
; ShellSpec Syntax Highlighting
|
|
; Extends tree-sitter-bash highlighting
|
|
|
|
; Block keywords (BDD test structure)
|
|
[
|
|
"Describe"
|
|
"Context"
|
|
"ExampleGroup"
|
|
"It"
|
|
"Example"
|
|
"Specify"
|
|
] @keyword.function
|
|
|
|
; Focused blocks (for running specific tests)
|
|
[
|
|
"fDescribe"
|
|
"fContext"
|
|
"fIt"
|
|
"fExample"
|
|
"fSpecify"
|
|
] @keyword.function.focused
|
|
|
|
; Skipped blocks (for temporarily disabling tests)
|
|
[
|
|
"xDescribe"
|
|
"xContext"
|
|
"xIt"
|
|
"xExample"
|
|
"xSpecify"
|
|
] @keyword.function.skipped
|
|
|
|
; Hook keywords
|
|
[
|
|
"Before"
|
|
"After"
|
|
"BeforeAll"
|
|
"AfterAll"
|
|
"BeforeEach"
|
|
"AfterEach"
|
|
"BeforeRun"
|
|
"AfterRun"
|
|
"BeforeCall"
|
|
"AfterCall"
|
|
] @keyword.control.hook
|
|
|
|
; Utility blocks
|
|
[
|
|
"Data"
|
|
"Parameters"
|
|
] @keyword.function.data
|
|
|
|
; Skip/Pending/Todo blocks
|
|
[
|
|
"Skip"
|
|
"Pending"
|
|
"Todo"
|
|
] @keyword.function.pending
|
|
|
|
; Block terminator
|
|
[
|
|
"End"
|
|
] @keyword.control
|
|
|
|
; Data block modifiers
|
|
[
|
|
":raw"
|
|
":expand"
|
|
"#|"
|
|
] @keyword.modifier
|
|
|
|
; Directives
|
|
[
|
|
"Include"
|
|
] @keyword.directive
|
|
|
|
; Comments (inherit from bash)
|
|
(comment) @comment
|
|
|
|
; Strings (inherit from bash)
|
|
(string) @string
|
|
(raw_string) @string
|
|
|
|
; Functions (inherit from bash)
|
|
(function_definition
|
|
name: (word) @function)
|
|
|
|
; Variables (inherit from bash)
|
|
(variable_name) @variable
|
|
|
|
; Operators (inherit from bash)
|
|
[
|
|
"&&"
|
|
"||"
|
|
"|"
|
|
";"
|
|
"&"
|
|
] @operator
|