Skip to content

Commit

Permalink
Adding simple susan test
Browse files Browse the repository at this point in the history
  • Loading branch information
AnHeuermann committed Mar 13, 2024
1 parent c3fd988 commit 77dd71c
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions test/susan/codegen.test.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// SYNTAX TEST "source.susan" "Example someTemplateFunction"

template someTemplateFunction(Text message, Context context, builtin.SourceInfo info)
//<--- source.susan keyword
// ^^^^^^^^^^^^^^^^^^^^^ source.susan entity.name.function
::=
//<-- source.susan keyword.control
match context
//^^^^^ source.susan keyword.control
case FUNCTION_CONTEXT(__) then
//^^^^ source.susan keyword.control
// ^^^^^^^^^^^^^^^^ source.susan entity.name.function
// ^^^^ source.susan keyword.control
<<
void foo() {
FILE_INFO info = {<%infoArgs(info)%>};
printf("<%message%>\"\n");
}
>>
// ^^ source.susan string.interpolated keyword
else
//^^^^ source.susan keyword.control
<<
void foo() {
printf("Unknown context\n");
printf("<%message%>\n");
}
>>
// ^^ source.susan string.interpolated keyword
end someTemplateFunction;
//<-- source.susan keyword
// ^^^^^^^^^^^^^^^^^^^^ source.susan entity.name.function

0 comments on commit 77dd71c

Please sign in to comment.