-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c3fd988
commit 77dd71c
Showing
1 changed file
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |