diff --git a/queries/highlights.scm b/queries/highlights.scm index 95d4c8b..1e355ae 100644 --- a/queries/highlights.scm +++ b/queries/highlights.scm @@ -56,6 +56,18 @@ "Todo" ] @keyword.function.pending +; Block terminator +[ + "End" +] @keyword.control + +; Data block modifiers +[ + ":raw" + ":expand" + "#|" +] @keyword.modifier + ; Directives [ "Include" diff --git a/test/corpus/utility_blocks.txt b/test/corpus/utility_blocks.txt index 2b1050e..2fd058a 100644 --- a/test/corpus/utility_blocks.txt +++ b/test/corpus/utility_blocks.txt @@ -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)))))))