PageRenderTime 60ms CodeModel.GetById 54ms app.highlight 4ms RepoModel.GetById 1ms app.codeStats 0ms

/samples/scalate-sample-sitegen/src/highlight/languages/cs.js

http://github.com/scalate/scalate
JavaScript | 47 lines | 40 code | 1 blank | 6 comment | 0 complexity | 511d9a76d33af783f76b0dd882885266 MD5 | raw file
 1/*
 2Language: C#
 3Author: Jason Diamond <jason@diamond.name>
 4*/
 5
 6hljs.LANGUAGES.cs  = {
 7  defaultMode: {
 8    lexems: [hljs.UNDERSCORE_IDENT_RE],
 9    contains: ['comment', 'string', 'number'],
10    keywords: {
11        // Normal keywords.
12        'abstract': 1, 'as': 1, 'base': 1, 'bool': 1, 'break': 1, 'byte': 1, 'case': 1, 'catch': 1, 'char': 1, 'checked': 1, 'class': 1, 'const': 1, 'continue': 1, 'decimal': 1, 'default': 1, 'delegate': 1, 'do': 1, 'do': 1, 'double': 1, 'else': 1, 'enum': 1, 'event': 1, 'explicit': 1, 'extern': 1, 'false': 1, 'finally': 1, 'fixed': 1, 'float': 1, 'for': 1, 'foreach': 1, 'goto': 1, 'if': 1, 'implicit': 1, 'in': 1, 'int': 1, 'interface': 1, 'internal': 1, 'is': 1, 'lock': 1, 'long': 1, 'namespace': 1, 'new': 1, 'null': 1, 'object': 1, 'operator': 1, 'out': 1, 'override': 1, 'params': 1, 'private': 1, 'protected': 1, 'public': 1, 'readonly': 1, 'ref': 1, 'return': 1, 'sbyte': 1, 'sealed': 1, 'short': 1, 'sizeof': 1, 'stackalloc': 1, 'static': 1, 'string': 1, 'struct': 1, 'switch': 1, 'this': 1, 'throw': 1, 'true': 1, 'try': 1, 'typeof': 1, 'uint': 1, 'ulong': 1, 'unchecked': 1, 'unsafe': 1, 'ushort': 1, 'using': 1, 'virtual': 1, 'volatile': 1, 'void': 1, 'while': 1,
13        // Contextual keywords.
14        'ascending': 1, 'descending': 1, 'from': 1, 'get': 1, 'group': 1, 'into': 1, 'join': 1, 'let': 1, 'orderby': 1, 'partial': 1, 'select': 1, 'set': 1, 'value': 1, 'var': 1, 'where': 1, 'yield': 1
15    }
16  },
17  modes: [
18    {
19      className: 'comment',
20      begin: '///', end: '$', returnBegin: true,
21      contains: ['xmlDocTag']
22    },
23    {
24      className: 'xmlDocTag',
25      begin: '///|<!--|-->', end: '^'
26    },
27    {
28      className: 'xmlDocTag',
29      begin: '</?', end: '>'
30    },
31    {
32      className: 'string',
33      begin: '@"', end: '"',
34      contains: ['quoteQuote']
35    },
36    {
37      className: 'quoteQuote',
38      begin: '""', end: '^'
39    },
40    hljs.C_LINE_COMMENT_MODE,
41    hljs.C_BLOCK_COMMENT_MODE,
42    hljs.APOS_STRING_MODE,
43    hljs.QUOTE_STRING_MODE,
44    hljs.BACKSLASH_ESCAPE,
45    hljs.C_NUMBER_MODE
46  ]
47};