forked from richrad/nanorc-mac
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcsharp.nanorc
24 lines (21 loc) · 1.1 KB
/
csharp.nanorc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
syntax "c#" "\.cs$"
# Class
SECTION: "class +[A-Za-z0-9]+ *((:) +[A-Za-z0-9.]+)?"
# Annotation
ESCAPE: "@[A-Za-z]+"
+FUNCTION
TYPE: "\<(bool|byte|sbyte|char|decimal|double|float|IntPtr|int|uint|long|ulong|object|short|ushort|string|base|this|var|void)\>"
KEYWORD: "\<(alias|as|case|catch|checked|default|do|dynamic|else|finally|fixed|for|foreach|goto|if|is|lock|new|null|return|switch|throw|try|unchecked|while)\>"
KEYWORD: "\<(abstract|async|class|const|delegate|enum|event|explicit|extern|get|implicit|in|internal|interface|namespace|operator|out|override|params|partial|private|protected|public|readonly|ref|sealed|set|sizeof|stackalloc|static|struct|typeof|unsafe|using|value|virtual|volatile|yield)\>"
# LINQ-only keywords (ones that cannot be used outside of a LINQ query - lots others can)
KEYWORD: "\<(from|where|select|group|info|orderby|join|let|in|on|equals|by|ascending|descending)\>"
JUMP: "\<(break|continue)\>"
+BOOLEAN
OPERATOR: "[-+/*=<>?:!~%&|]"
NUMBER: "\<([0-9._]+|0x[A-Fa-f0-9_]+|0b[0-1_]+)[FL]?\>"
+STRING
ESCAPE: "\\([btnfr]|'|\"|\\)"
ESCAPE: "\\u[A-Fa-f0-9]{4}"
+CCOMMENT
+TODO
+LINT