mirror of
https://github.com/ivuorinen/tree-sitter-shellspec.git
synced 2026-01-26 11:43:59 +00:00
Documentation Fixes: - README.md: Update test count from 59 to 63 (badge, features, test command) - README.md: Fix lint script references to actual npm scripts - CONTRIBUTING.md: Correct format script reference to npm run format:check - package.json: Remove non-existent yamllint script, split lint:markdown into check/fix variants Grammar Enhancements: - Add fExampleGroup and xExampleGroup to Context block variants - Regenerate parser with new grammar (63/63 tests passing, 100% success rate) Syntax Highlighting: - Add fExampleGroup and xExampleGroup to focused/skipped block highlights - Remove non-matching Data modifier tokens (:raw, :expand, #|) - Add "End" keyword as block terminator Memory File Corrections: - Remove incorrect merge_group trigger references - Remove pr-lint.yml workflow references (deleted in previous optimization) - Update test counts with timestamps (59→63, added 2025-12-11) - Update conflict count (13→5, optimized) Code Style: - Auto-format renovate.json and tree-sitter.json with prettier
93 lines
1.3 KiB
Scheme
93 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"
|
|
"fExampleGroup"
|
|
"fIt"
|
|
"fExample"
|
|
"fSpecify"
|
|
] @keyword.function.focused
|
|
|
|
; Skipped blocks (for temporarily disabling tests)
|
|
[
|
|
"xDescribe"
|
|
"xContext"
|
|
"xExampleGroup"
|
|
"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
|
|
|
|
; 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
|