]> git.lizzy.rs Git - micro.git/blob - runtime/syntax/csharp.yaml
Add converted syntax files
[micro.git] / runtime / syntax / csharp.yaml
1 filetype: c#
2
3 detect: 
4     filename: "\\.cs$"
5
6 rules:
7     - identifier.class: "class +[A-Za-z0-9]+ *((:) +[A-Za-z0-9.]+)?"
8     - identifier.var: "@[A-Za-z]+"
9     - identifier: "[A-Za-z_][A-Za-z0-9_]*[[:space:]]*[()]"
10     - type: "\\b(bool|byte|sbyte|char|decimal|double|float|IntPtr|int|uint|long|ulong|object|short|ushort|string|base|this|var|void)\\b"
11     - statement: "\\b(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)\\b"
12     - statement: "\\b(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)\\b"
13     - statement: "\\b(from|where|select|group|info|orderby|join|let|in|on|equals|by|ascending|descending)\\b"
14     - special: "\\b(break|continue)\\b"
15     - constant.bool: "\\b(true|false)\\b"
16     - symbol.operator: "[\\-+/*=<>?:!~%&|]"
17     - constant.number: "\\b([0-9._]+|0x[A-Fa-f0-9_]+|0b[0-1_]+)[FL]?\\b"
18     - constant.string: "\"(\\\\.|[^\"])*\"|'(\\\\.|[^'])*'"
19     - constant.specialChar: "\\\\([btnfr]|'|\\\"|\\\\)"
20     - constant.specialChar: "\\\\u[A-Fa-f0-9]{4}"
21     - comment: "(^|[[:space:]])//.*"
22     - comment:
23         start: "/\\*"
24         end: "\\*/"
25         rules: []
26
27     - todo: "TODO:?"
28     - indent-char.whitespace: "[[:space:]]+$"
29     - indent-char: "    + +| +  +"