diff options
Diffstat (limited to 'tests/snippets/csound')
21 files changed, 1155 insertions, 0 deletions
diff --git a/tests/snippets/csound/test_braced_strings.txt b/tests/snippets/csound/test_braced_strings.txt new file mode 100644 index 0000000..6921af9 --- /dev/null +++ b/tests/snippets/csound/test_braced_strings.txt @@ -0,0 +1,11 @@ +---input--- +{{ +characters$MACRO. +}} + +---tokens--- +'{{' Literal.String +'\ncharacters$MACRO.\n' Literal.String + +'}}' Literal.String +'\n' Text.Whitespace diff --git a/tests/snippets/csound/test_comments.txt b/tests/snippets/csound/test_comments.txt new file mode 100644 index 0000000..e660c2b --- /dev/null +++ b/tests/snippets/csound/test_comments.txt @@ -0,0 +1,16 @@ +---input--- +/* + * comment + */ +; comment +// comment + +---tokens--- +'/*\n * comment\n */' Comment.Multiline +'\n' Text.Whitespace + +'; comment' Comment.Single +'\n' Text.Whitespace + +'// comment' Comment.Single +'\n' Text.Whitespace diff --git a/tests/snippets/csound/test_escape_sequences.txt b/tests/snippets/csound/test_escape_sequences.txt new file mode 100644 index 0000000..8e7ba10 --- /dev/null +++ b/tests/snippets/csound/test_escape_sequences.txt @@ -0,0 +1,122 @@ +---input--- +"\\" +{{\\}} +"\a" +{{\a}} +"\b" +{{\b}} +"\n" +{{\n}} +"\r" +{{\r}} +"\t" +{{\t}} +"\"" +{{\"}} +"\012" +{{\012}} +"\345" +{{\345}} +"\67" +{{\67}} + +---tokens--- +'"' Literal.String +'\\\\' Literal.String.Escape +'"' Literal.String +'\n' Text.Whitespace + +'{{' Literal.String +'\\\\' Literal.String.Escape +'}}' Literal.String +'\n' Text.Whitespace + +'"' Literal.String +'\\a' Literal.String.Escape +'"' Literal.String +'\n' Text.Whitespace + +'{{' Literal.String +'\\a' Literal.String.Escape +'}}' Literal.String +'\n' Text.Whitespace + +'"' Literal.String +'\\b' Literal.String.Escape +'"' Literal.String +'\n' Text.Whitespace + +'{{' Literal.String +'\\b' Literal.String.Escape +'}}' Literal.String +'\n' Text.Whitespace + +'"' Literal.String +'\\n' Literal.String.Escape +'"' Literal.String +'\n' Text.Whitespace + +'{{' Literal.String +'\\n' Literal.String.Escape +'}}' Literal.String +'\n' Text.Whitespace + +'"' Literal.String +'\\r' Literal.String.Escape +'"' Literal.String +'\n' Text.Whitespace + +'{{' Literal.String +'\\r' Literal.String.Escape +'}}' Literal.String +'\n' Text.Whitespace + +'"' Literal.String +'\\t' Literal.String.Escape +'"' Literal.String +'\n' Text.Whitespace + +'{{' Literal.String +'\\t' Literal.String.Escape +'}}' Literal.String +'\n' Text.Whitespace + +'"' Literal.String +'\\"' Literal.String.Escape +'"' Literal.String +'\n' Text.Whitespace + +'{{' Literal.String +'\\"' Literal.String.Escape +'}}' Literal.String +'\n' Text.Whitespace + +'"' Literal.String +'\\012' Literal.String.Escape +'"' Literal.String +'\n' Text.Whitespace + +'{{' Literal.String +'\\012' Literal.String.Escape +'}}' Literal.String +'\n' Text.Whitespace + +'"' Literal.String +'\\345' Literal.String.Escape +'"' Literal.String +'\n' Text.Whitespace + +'{{' Literal.String +'\\345' Literal.String.Escape +'}}' Literal.String +'\n' Text.Whitespace + +'"' Literal.String +'\\67' Literal.String.Escape +'"' Literal.String +'\n' Text.Whitespace + +'{{' Literal.String +'\\67' Literal.String.Escape +'}}' Literal.String +'\n' Text.Whitespace diff --git a/tests/snippets/csound/test_function_like_macro_definitions.txt b/tests/snippets/csound/test_function_like_macro_definitions.txt new file mode 100644 index 0000000..555f4ad --- /dev/null +++ b/tests/snippets/csound/test_function_like_macro_definitions.txt @@ -0,0 +1,44 @@ +---input--- +#define MACRO(ARG1#ARG2) #macro_body# +#define/**/ +MACRO(ARG1'ARG2' ARG3)/**/ +#\#macro +body\## + +---tokens--- +'#define' Comment.Preproc +' ' Text.Whitespace +'MACRO' Comment.Preproc +'(' Punctuation +'ARG1' Comment.Preproc +'#' Punctuation +'ARG2' Comment.Preproc +')' Punctuation +' ' Text.Whitespace +'#' Punctuation +'macro_body' Comment.Preproc +'#' Punctuation +'\n' Text.Whitespace + +'#define' Comment.Preproc +'/**/' Comment.Multiline +'\n' Text.Whitespace + +'MACRO' Comment.Preproc +'(' Punctuation +'ARG1' Comment.Preproc +"'" Punctuation +'ARG2' Comment.Preproc +"'" Punctuation +' ' Text.Whitespace +'ARG3' Comment.Preproc +')' Punctuation +'/**/' Comment.Multiline +'\n' Text.Whitespace + +'#' Punctuation +'\\#' Comment.Preproc +'macro\nbody' Comment.Preproc +'\\#' Comment.Preproc +'#' Punctuation +'\n' Text.Whitespace diff --git a/tests/snippets/csound/test_function_like_macros.txt b/tests/snippets/csound/test_function_like_macros.txt new file mode 100644 index 0000000..955cc18 --- /dev/null +++ b/tests/snippets/csound/test_function_like_macros.txt @@ -0,0 +1,40 @@ +---input--- +$MACRO.(((x#y\)))' "(#'x)\)x\))"# {{x\))x)\)(#'}}); + +---tokens--- +'$MACRO.' Comment.Preproc +'(' Punctuation +'(' Comment.Preproc +'(' Comment.Preproc +'x#y\\)' Comment.Preproc +')' Comment.Preproc +')' Comment.Preproc +"'" Punctuation +' ' Comment.Preproc +'"' Literal.String +'(' Error +'#' Error +"'" Error +'x' Literal.String +')' Error +'\\)' Comment.Preproc +'x' Literal.String +'\\)' Comment.Preproc +')' Error +'"' Literal.String +'#' Punctuation +' ' Comment.Preproc +'{{' Literal.String +'x' Literal.String +'\\)' Comment.Preproc +')' Error +'x' Literal.String +')' Error +'\\)' Comment.Preproc +'(' Error +'#' Error +"'" Error +'}}' Literal.String +')' Punctuation +';' Comment.Single +'\n' Text.Whitespace diff --git a/tests/snippets/csound/test_global_value_identifiers.txt b/tests/snippets/csound/test_global_value_identifiers.txt new file mode 100644 index 0000000..4604200 --- /dev/null +++ b/tests/snippets/csound/test_global_value_identifiers.txt @@ -0,0 +1,30 @@ +---input--- +0dbfs +A4 +kr +ksmps +nchnls +nchnls_i +sr + +---tokens--- +'0dbfs' Name.Variable.Global +'\n' Text.Whitespace + +'A4' Name.Variable.Global +'\n' Text.Whitespace + +'kr' Name.Variable.Global +'\n' Text.Whitespace + +'ksmps' Name.Variable.Global +'\n' Text.Whitespace + +'nchnls' Name.Variable.Global +'\n' Text.Whitespace + +'nchnls_i' Name.Variable.Global +'\n' Text.Whitespace + +'sr' Name.Variable.Global +'\n' Text.Whitespace diff --git a/tests/snippets/csound/test_goto_statements.txt b/tests/snippets/csound/test_goto_statements.txt new file mode 100644 index 0000000..95a76ab --- /dev/null +++ b/tests/snippets/csound/test_goto_statements.txt @@ -0,0 +1,176 @@ +---input--- +goto aLabel +igoto aLabel +kgoto aLabel +reinit aLabel +rigoto aLabel +tigoto aLabel +cggoto 1==0, aLabel +cigoto 1==0, aLabel +cingoto 1==0, aLabel +ckgoto 1==0, aLabel +cngoto 1==0, aLabel +cnkgoto 1==0, aLabel +timout 0, 0, aLabel +loop_ge 0, 0, 0, aLabel +loop_gt 0, 0, 0, aLabel +loop_le 0, 0, 0, aLabel +loop_lt 0, 0, 0, aLabel + +---tokens--- +'goto' Keyword +' ' Text.Whitespace +'aLabel' Name.Label +'\n' Text.Whitespace + +'igoto' Keyword +' ' Text.Whitespace +'aLabel' Name.Label +'\n' Text.Whitespace + +'kgoto' Keyword +' ' Text.Whitespace +'aLabel' Name.Label +'\n' Text.Whitespace + +'reinit' Keyword.Pseudo +' ' Text.Whitespace +'aLabel' Name.Label +'\n' Text.Whitespace + +'rigoto' Keyword.Pseudo +' ' Text.Whitespace +'aLabel' Name.Label +'\n' Text.Whitespace + +'tigoto' Keyword.Pseudo +' ' Text.Whitespace +'aLabel' Name.Label +'\n' Text.Whitespace + +'cggoto' Keyword.Pseudo +' ' Text.Whitespace +'1' Literal.Number.Integer +'==' Operator +'0' Literal.Number.Integer +',' Punctuation +' ' Text.Whitespace +'aLabel' Name.Label +'\n' Text.Whitespace + +'cigoto' Keyword.Pseudo +' ' Text.Whitespace +'1' Literal.Number.Integer +'==' Operator +'0' Literal.Number.Integer +',' Punctuation +' ' Text.Whitespace +'aLabel' Name.Label +'\n' Text.Whitespace + +'cingoto' Keyword.Pseudo +' ' Text.Whitespace +'1' Literal.Number.Integer +'==' Operator +'0' Literal.Number.Integer +',' Punctuation +' ' Text.Whitespace +'aLabel' Name.Label +'\n' Text.Whitespace + +'ckgoto' Keyword.Pseudo +' ' Text.Whitespace +'1' Literal.Number.Integer +'==' Operator +'0' Literal.Number.Integer +',' Punctuation +' ' Text.Whitespace +'aLabel' Name.Label +'\n' Text.Whitespace + +'cngoto' Keyword.Pseudo +' ' Text.Whitespace +'1' Literal.Number.Integer +'==' Operator +'0' Literal.Number.Integer +',' Punctuation +' ' Text.Whitespace +'aLabel' Name.Label +'\n' Text.Whitespace + +'cnkgoto' Keyword.Pseudo +' ' Text.Whitespace +'1' Literal.Number.Integer +'==' Operator +'0' Literal.Number.Integer +',' Punctuation +' ' Text.Whitespace +'aLabel' Name.Label +'\n' Text.Whitespace + +'timout' Keyword.Pseudo +' ' Text.Whitespace +'0' Literal.Number.Integer +',' Punctuation +' ' Text.Whitespace +'0' Literal.Number.Integer +',' Punctuation +' ' Text.Whitespace +'aLabel' Name.Label +'\n' Text.Whitespace + +'loop_ge' Keyword.Pseudo +' ' Text.Whitespace +'0' Literal.Number.Integer +',' Punctuation +' ' Text.Whitespace +'0' Literal.Number.Integer +',' Punctuation +' ' Text.Whitespace +'0' Literal.Number.Integer +',' Punctuation +' ' Text.Whitespace +'aLabel' Name.Label +'\n' Text.Whitespace + +'loop_gt' Keyword.Pseudo +' ' Text.Whitespace +'0' Literal.Number.Integer +',' Punctuation +' ' Text.Whitespace +'0' Literal.Number.Integer +',' Punctuation +' ' Text.Whitespace +'0' Literal.Number.Integer +',' Punctuation +' ' Text.Whitespace +'aLabel' Name.Label +'\n' Text.Whitespace + +'loop_le' Keyword.Pseudo +' ' Text.Whitespace +'0' Literal.Number.Integer +',' Punctuation +' ' Text.Whitespace +'0' Literal.Number.Integer +',' Punctuation +' ' Text.Whitespace +'0' Literal.Number.Integer +',' Punctuation +' ' Text.Whitespace +'aLabel' Name.Label +'\n' Text.Whitespace + +'loop_lt' Keyword.Pseudo +' ' Text.Whitespace +'0' Literal.Number.Integer +',' Punctuation +' ' Text.Whitespace +'0' Literal.Number.Integer +',' Punctuation +' ' Text.Whitespace +'0' Literal.Number.Integer +',' Punctuation +' ' Text.Whitespace +'aLabel' Name.Label +'\n' Text.Whitespace diff --git a/tests/snippets/csound/test_include_directives.txt b/tests/snippets/csound/test_include_directives.txt new file mode 100644 index 0000000..b90f300 --- /dev/null +++ b/tests/snippets/csound/test_include_directives.txt @@ -0,0 +1,14 @@ +---input--- +#include/**/"file.udo" +#include/**/|file.udo| + +---tokens--- +'#include' Comment.Preproc +'/**/' Comment.Multiline +'"file.udo"' Literal.String +'\n' Text.Whitespace + +'#include' Comment.Preproc +'/**/' Comment.Multiline +'|file.udo|' Literal.String +'\n' Text.Whitespace diff --git a/tests/snippets/csound/test_includestr_directives.txt b/tests/snippets/csound/test_includestr_directives.txt new file mode 100644 index 0000000..0511c5d --- /dev/null +++ b/tests/snippets/csound/test_includestr_directives.txt @@ -0,0 +1,11 @@ +---input--- +#includestr/**/"$MACRO..udo" + +---tokens--- +'#includestr' Comment.Preproc +'/**/' Comment.Multiline +'"' Literal.String +'$MACRO.' Comment.Preproc +'.udo' Literal.String +'"' Literal.String +'\n' Text.Whitespace diff --git a/tests/snippets/csound/test_instrument_blocks.txt b/tests/snippets/csound/test_instrument_blocks.txt new file mode 100644 index 0000000..b6b0ba9 --- /dev/null +++ b/tests/snippets/csound/test_instrument_blocks.txt @@ -0,0 +1,42 @@ +---input--- +instr/**/1,/**/N_a_M_e_,/**/+Name/**/// + iDuration = p3 + outc:a(aSignal) +endin + +---tokens--- +'instr' Keyword.Declaration +'/**/' Comment.Multiline +'1' Name.Function +',' Punctuation +'/**/' Comment.Multiline +'N_a_M_e_' Name.Function +',' Punctuation +'/**/' Comment.Multiline +'+' Punctuation +'Name' Name.Function +'/**/' Comment.Multiline +'//' Comment.Single +'\n' Text.Whitespace + +' ' Text.Whitespace +'i' Keyword.Type +'Duration' Name +' ' Text.Whitespace +'=' Operator +' ' Text.Whitespace +'p3' Name.Variable.Instance +'\n' Text.Whitespace + +' ' Text.Whitespace +'outc' Name.Builtin +':' Punctuation +'a' Keyword.Type +'(' Punctuation +'a' Keyword.Type +'Signal' Name +')' Punctuation +'\n' Text.Whitespace + +'endin' Keyword.Declaration +'\n' Text.Whitespace diff --git a/tests/snippets/csound/test_keywords.txt b/tests/snippets/csound/test_keywords.txt new file mode 100644 index 0000000..eb67eca --- /dev/null +++ b/tests/snippets/csound/test_keywords.txt @@ -0,0 +1,62 @@ +---input--- +do +else +elseif +endif +enduntil +fi +if +ithen +kthen +od +then +until +while +return +rireturn + +---tokens--- +'do' Keyword +'\n' Text.Whitespace + +'else' Keyword +'\n' Text.Whitespace + +'elseif' Keyword +'\n' Text.Whitespace + +'endif' Keyword +'\n' Text.Whitespace + +'enduntil' Keyword +'\n' Text.Whitespace + +'fi' Keyword +'\n' Text.Whitespace + +'if' Keyword +'\n' Text.Whitespace + +'ithen' Keyword +'\n' Text.Whitespace + +'kthen' Keyword +'\n' Text.Whitespace + +'od' Keyword +'\n' Text.Whitespace + +'then' Keyword +'\n' Text.Whitespace + +'until' Keyword +'\n' Text.Whitespace + +'while' Keyword +'\n' Text.Whitespace + +'return' Keyword.Pseudo +'\n' Text.Whitespace + +'rireturn' Keyword.Pseudo +'\n' Text.Whitespace diff --git a/tests/snippets/csound/test_labels.txt b/tests/snippets/csound/test_labels.txt new file mode 100644 index 0000000..afa6be9 --- /dev/null +++ b/tests/snippets/csound/test_labels.txt @@ -0,0 +1,13 @@ +---input--- +aLabel: + label2: + +---tokens--- +'aLabel' Name.Label +':' Punctuation +'\n' Text.Whitespace + +' ' Text.Whitespace +'label2' Name.Label +':' Punctuation +'\n' Text.Whitespace diff --git a/tests/snippets/csound/test_macro_preprocessor_directives.txt b/tests/snippets/csound/test_macro_preprocessor_directives.txt new file mode 100644 index 0000000..0a576f6 --- /dev/null +++ b/tests/snippets/csound/test_macro_preprocessor_directives.txt @@ -0,0 +1,20 @@ +---input--- +#ifdef MACRO +#ifndef MACRO +#undef MACRO + +---tokens--- +'#ifdef' Comment.Preproc +' ' Text.Whitespace +'MACRO' Comment.Preproc +'\n' Text.Whitespace + +'#ifndef' Comment.Preproc +' ' Text.Whitespace +'MACRO' Comment.Preproc +'\n' Text.Whitespace + +'#undef' Comment.Preproc +' ' Text.Whitespace +'MACRO' Comment.Preproc +'\n' Text.Whitespace diff --git a/tests/snippets/csound/test_name.txt b/tests/snippets/csound/test_name.txt new file mode 100644 index 0000000..7ae5d58 --- /dev/null +++ b/tests/snippets/csound/test_name.txt @@ -0,0 +1,9 @@ +---input--- +kG:V + +---tokens--- +'k' Keyword.Type +'G' Name +':' Punctuation +'V' Name +'\n' Text.Whitespace diff --git a/tests/snippets/csound/test_numbers.txt b/tests/snippets/csound/test_numbers.txt new file mode 100644 index 0000000..63a8106 --- /dev/null +++ b/tests/snippets/csound/test_numbers.txt @@ -0,0 +1,52 @@ +---input--- +123 0123456789 +0xabcdef0123456789 0XABCDEF +1e2 +3e+4 +5e-6 +7E8 +9E+0 +1E-2 +3. +4.56 +.789 + +---tokens--- +'123' Literal.Number.Integer +' ' Text.Whitespace +'0123456789' Literal.Number.Integer +'\n' Text.Whitespace + +'0x' Keyword.Type +'abcdef0123456789' Literal.Number.Hex +' ' Text.Whitespace +'0X' Keyword.Type +'ABCDEF' Literal.Number.Hex +'\n' Text.Whitespace + +'1e2' Literal.Number.Float +'\n' Text.Whitespace + +'3e+4' Literal.Number.Float +'\n' Text.Whitespace + +'5e-6' Literal.Number.Float +'\n' Text.Whitespace + +'7E8' Literal.Number.Float +'\n' Text.Whitespace + +'9E+0' Literal.Number.Float +'\n' Text.Whitespace + +'1E-2' Literal.Number.Float +'\n' Text.Whitespace + +'3.' Literal.Number.Float +'\n' Text.Whitespace + +'4.56' Literal.Number.Float +'\n' Text.Whitespace + +'.789' Literal.Number.Float +'\n' Text.Whitespace diff --git a/tests/snippets/csound/test_object_like_macro_definitions.txt b/tests/snippets/csound/test_object_like_macro_definitions.txt new file mode 100644 index 0000000..dd165f3 --- /dev/null +++ b/tests/snippets/csound/test_object_like_macro_definitions.txt @@ -0,0 +1,30 @@ +---input--- +# define MACRO#macro_body# +#define/**/ +MACRO/**/ +#\#macro +body\## + +---tokens--- +'# \tdefine' Comment.Preproc +' ' Text.Whitespace +'MACRO' Comment.Preproc +'#' Punctuation +'macro_body' Comment.Preproc +'#' Punctuation +'\n' Text.Whitespace + +'#define' Comment.Preproc +'/**/' Comment.Multiline +'\n' Text.Whitespace + +'MACRO' Comment.Preproc +'/**/' Comment.Multiline +'\n' Text.Whitespace + +'#' Punctuation +'\\#' Comment.Preproc +'macro\nbody' Comment.Preproc +'\\#' Comment.Preproc +'#' Punctuation +'\n' Text.Whitespace diff --git a/tests/snippets/csound/test_operators.txt b/tests/snippets/csound/test_operators.txt new file mode 100644 index 0000000..1154a44 --- /dev/null +++ b/tests/snippets/csound/test_operators.txt @@ -0,0 +1,114 @@ +---input--- ++ +- +~ +¬ +! +* +/ +^ +% +<< +>> +< +> +<= +>= +== +!= +& +# +| +&& +|| +? +: ++= +-= +*= +/= + +---tokens--- +'+' Operator +'\n' Text.Whitespace + +'-' Operator +'\n' Text.Whitespace + +'~' Operator +'\n' Text.Whitespace + +'¬' Operator +'\n' Text.Whitespace + +'!' Operator +'\n' Text.Whitespace + +'*' Operator +'\n' Text.Whitespace + +'/' Operator +'\n' Text.Whitespace + +'^' Operator +'\n' Text.Whitespace + +'%' Operator +'\n' Text.Whitespace + +'<<' Operator +'\n' Text.Whitespace + +'>>' Operator +'\n' Text.Whitespace + +'<' Operator +'\n' Text.Whitespace + +'>' Operator +'\n' Text.Whitespace + +'<=' Operator +'\n' Text.Whitespace + +'>=' Operator +'\n' Text.Whitespace + +'==' Operator +'\n' Text.Whitespace + +'!=' Operator +'\n' Text.Whitespace + +'&' Operator +'\n' Text.Whitespace + +'#' Operator +'\n' Text.Whitespace + +'|' Operator +'\n' Text.Whitespace + +'&&' Operator +'\n' Text.Whitespace + +'||' Operator +'\n' Text.Whitespace + +'?' Operator +'\n' Text.Whitespace + +':' Operator +'\n' Text.Whitespace + +'+=' Operator +'\n' Text.Whitespace + +'-=' Operator +'\n' Text.Whitespace + +'*=' Operator +'\n' Text.Whitespace + +'/=' Operator +'\n' Text.Whitespace diff --git a/tests/snippets/csound/test_other_preprocessor_directives.txt b/tests/snippets/csound/test_other_preprocessor_directives.txt new file mode 100644 index 0000000..95026a0 --- /dev/null +++ b/tests/snippets/csound/test_other_preprocessor_directives.txt @@ -0,0 +1,26 @@ +---input--- +#else +#end +#endif +### +@ 12345 +@@ 67890 + +---tokens--- +'#else' Comment.Preproc +'\n' Text.Whitespace + +'#end' Comment.Preproc +'\n' Text.Whitespace + +'#endif' Comment.Preproc +'\n' Text.Whitespace + +'###' Comment.Preproc +'\n' Text.Whitespace + +'@ \t12345' Comment.Preproc +'\n' Text.Whitespace + +'@@ \t67890' Comment.Preproc +'\n' Text.Whitespace diff --git a/tests/snippets/csound/test_printks_and_prints_escape_sequences.txt b/tests/snippets/csound/test_printks_and_prints_escape_sequences.txt new file mode 100644 index 0000000..3663dbb --- /dev/null +++ b/tests/snippets/csound/test_printks_and_prints_escape_sequences.txt @@ -0,0 +1,290 @@ +---input--- +printks "%!" +printks "%%" +printks "%n" +printks "%N" +printks "%r" +printks "%R" +printks "%t" +printks "%T" +printks "\\a" +printks "\\A" +printks "\\b" +printks "\\B" +printks "\\n" +printks "\\N" +printks "\\r" +printks "\\R" +printks "\\t" +printks "\\T" +prints "%!" +prints "%%" +prints "%n" +prints "%N" +prints "%r" +prints "%R" +prints "%t" +prints "%T" +prints "\\a" +prints "\\A" +prints "\\b" +prints "\\B" +prints "\\n" +prints "\\N" +prints "\\r" +prints "\\R" +prints "\\t" +prints "\\T" + +---tokens--- +'printks' Name.Builtin +' ' Text.Whitespace +'"' Literal.String +'%!' Literal.String.Escape +'"' Literal.String +'\n' Text.Whitespace + +'printks' Name.Builtin +' ' Text.Whitespace +'"' Literal.String +'%%' Literal.String.Escape +'"' Literal.String +'\n' Text.Whitespace + +'printks' Name.Builtin +' ' Text.Whitespace +'"' Literal.String +'%n' Literal.String.Escape +'"' Literal.String +'\n' Text.Whitespace + +'printks' Name.Builtin +' ' Text.Whitespace +'"' Literal.String +'%N' Literal.String.Escape +'"' Literal.String +'\n' Text.Whitespace + +'printks' Name.Builtin +' ' Text.Whitespace +'"' Literal.String +'%r' Literal.String.Escape +'"' Literal.String +'\n' Text.Whitespace + +'printks' Name.Builtin +' ' Text.Whitespace +'"' Literal.String +'%R' Literal.String.Escape +'"' Literal.String +'\n' Text.Whitespace + +'printks' Name.Builtin +' ' Text.Whitespace +'"' Literal.String +'%t' Literal.String.Escape +'"' Literal.String +'\n' Text.Whitespace + +'printks' Name.Builtin +' ' Text.Whitespace +'"' Literal.String +'%T' Literal.String.Escape +'"' Literal.String +'\n' Text.Whitespace + +'printks' Name.Builtin +' ' Text.Whitespace +'"' Literal.String +'\\\\a' Literal.String.Escape +'"' Literal.String +'\n' Text.Whitespace + +'printks' Name.Builtin +' ' Text.Whitespace +'"' Literal.String +'\\\\A' Literal.String.Escape +'"' Literal.String +'\n' Text.Whitespace + +'printks' Name.Builtin +' ' Text.Whitespace +'"' Literal.String +'\\\\b' Literal.String.Escape +'"' Literal.String +'\n' Text.Whitespace + +'printks' Name.Builtin +' ' Text.Whitespace +'"' Literal.String +'\\\\B' Literal.String.Escape +'"' Literal.String +'\n' Text.Whitespace + +'printks' Name.Builtin +' ' Text.Whitespace +'"' Literal.String +'\\\\n' Literal.String.Escape +'"' Literal.String +'\n' Text.Whitespace + +'printks' Name.Builtin +' ' Text.Whitespace +'"' Literal.String +'\\\\N' Literal.String.Escape +'"' Literal.String +'\n' Text.Whitespace + +'printks' Name.Builtin +' ' Text.Whitespace +'"' Literal.String +'\\\\r' Literal.String.Escape +'"' Literal.String +'\n' Text.Whitespace + +'printks' Name.Builtin +' ' Text.Whitespace +'"' Literal.String +'\\\\R' Literal.String.Escape +'"' Literal.String +'\n' Text.Whitespace + +'printks' Name.Builtin +' ' Text.Whitespace +'"' Literal.String +'\\\\t' Literal.String.Escape +'"' Literal.String +'\n' Text.Whitespace + +'printks' Name.Builtin +' ' Text.Whitespace +'"' Literal.String +'\\\\T' Literal.String.Escape +'"' Literal.String +'\n' Text.Whitespace + +'prints' Name.Builtin +' ' Text.Whitespace +'"' Literal.String +'%!' Literal.String.Escape +'"' Literal.String +'\n' Text.Whitespace + +'prints' Name.Builtin +' ' Text.Whitespace +'"' Literal.String +'%%' Literal.String.Escape +'"' Literal.String +'\n' Text.Whitespace + +'prints' Name.Builtin +' ' Text.Whitespace +'"' Literal.String +'%n' Literal.String.Escape +'"' Literal.String +'\n' Text.Whitespace + +'prints' Name.Builtin +' ' Text.Whitespace +'"' Literal.String +'%N' Literal.String.Escape +'"' Literal.String +'\n' Text.Whitespace + +'prints' Name.Builtin +' ' Text.Whitespace +'"' Literal.String +'%r' Literal.String.Escape +'"' Literal.String +'\n' Text.Whitespace + +'prints' Name.Builtin +' ' Text.Whitespace +'"' Literal.String +'%R' Literal.String.Escape +'"' Literal.String +'\n' Text.Whitespace + +'prints' Name.Builtin +' ' Text.Whitespace +'"' Literal.String +'%t' Literal.String.Escape +'"' Literal.String +'\n' Text.Whitespace + +'prints' Name.Builtin +' ' Text.Whitespace +'"' Literal.String +'%T' Literal.String.Escape +'"' Literal.String +'\n' Text.Whitespace + +'prints' Name.Builtin +' ' Text.Whitespace +'"' Literal.String +'\\\\a' Literal.String.Escape +'"' Literal.String +'\n' Text.Whitespace + +'prints' Name.Builtin +' ' Text.Whitespace +'"' Literal.String +'\\\\A' Literal.String.Escape +'"' Literal.String +'\n' Text.Whitespace + +'prints' Name.Builtin +' ' Text.Whitespace +'"' Literal.String +'\\\\b' Literal.String.Escape +'"' Literal.String +'\n' Text.Whitespace + +'prints' Name.Builtin +' ' Text.Whitespace +'"' Literal.String +'\\\\B' Literal.String.Escape +'"' Literal.String +'\n' Text.Whitespace + +'prints' Name.Builtin +' ' Text.Whitespace +'"' Literal.String +'\\\\n' Literal.String.Escape +'"' Literal.String +'\n' Text.Whitespace + +'prints' Name.Builtin +' ' Text.Whitespace +'"' Literal.String +'\\\\N' Literal.String.Escape +'"' Literal.String +'\n' Text.Whitespace + +'prints' Name.Builtin +' ' Text.Whitespace +'"' Literal.String +'\\\\r' Literal.String.Escape +'"' Literal.String +'\n' Text.Whitespace + +'prints' Name.Builtin +' ' Text.Whitespace +'"' Literal.String +'\\\\R' Literal.String.Escape +'"' Literal.String +'\n' Text.Whitespace + +'prints' Name.Builtin +' ' Text.Whitespace +'"' Literal.String +'\\\\t' Literal.String.Escape +'"' Literal.String +'\n' Text.Whitespace + +'prints' Name.Builtin +' ' Text.Whitespace +'"' Literal.String +'\\\\T' Literal.String.Escape +'"' Literal.String +'\n' Text.Whitespace diff --git a/tests/snippets/csound/test_quoted_strings.txt b/tests/snippets/csound/test_quoted_strings.txt new file mode 100644 index 0000000..d7e828a --- /dev/null +++ b/tests/snippets/csound/test_quoted_strings.txt @@ -0,0 +1,9 @@ +---input--- +"characters$MACRO." + +---tokens--- +'"' Literal.String +'characters' Literal.String +'$MACRO.' Comment.Preproc +'"' Literal.String +'\n' Text.Whitespace diff --git a/tests/snippets/csound/test_user_defined_opcodes.txt b/tests/snippets/csound/test_user_defined_opcodes.txt new file mode 100644 index 0000000..6320566 --- /dev/null +++ b/tests/snippets/csound/test_user_defined_opcodes.txt @@ -0,0 +1,24 @@ +---input--- +opcode/**/aUDO,/**/i[],/**/aik// + aUDO +endop + +---tokens--- +'opcode' Keyword.Declaration +'/**/' Comment.Multiline +'aUDO' Name.Function +',' Punctuation +'/**/' Comment.Multiline +'i[]' Keyword.Type +',' Punctuation +'/**/' Comment.Multiline +'aik' Keyword.Type +'//' Comment.Single +'\n' Text.Whitespace + +' ' Text.Whitespace +'aUDO' Name.Function +'\n' Text.Whitespace + +'endop' Keyword.Declaration +'\n' Text.Whitespace |