csharp
The community/lang/csharp
directory contains files that provide support for the C# programming language in Talon.
The file csharp.py
defines a Talon context that activates when the current code language is C#. It defines several actions using the @ctx.action_class("user")
decorator that are used for common coding tasks:
- Inserting operators such as
*
,&
,->
,=>
,[]
,=
,+
,-
,*
,/
,%
,==
,!=
,>
,>=
,<
,<=
,&&
,||
,&
,|
,^
,<<
,>>
. - Inserting keywords such as
this
,null
,true
, andfalse
. - Inserting common control flow statements such as
if
,else if
,else
,switch
,case
,for
,foreach
,go to
,while
,return
,break
, andcontinue
. - Defining and inserting functions with different visibility modifiers (private, protected, public) and static specifiers.
- Inserting comments.
- Inserting common C# functions like
int.TryParse
andConsole.WriteLine
.
The file csharp.talon
defines the following:
- Tags to mark this as an imperative and object-oriented language, as well as tags for C-like blocks, line and block comments, boolean data, null data, functions, common functions, libraries, array operators, assignment operators, bitwise operators, lambda operators, math operators, and pointer operators.
- Settings that define the format used when inserting private, protected, and public functions and variables.