main
Last change
on this file was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago |
Initial commit
|
-
Property mode
set to
100644
|
File size:
1.7 KB
|
Line | |
---|
1 | Prism.languages.kusto = {
|
---|
2 | 'comment': {
|
---|
3 | pattern: /\/\/.*/,
|
---|
4 | greedy: true
|
---|
5 | },
|
---|
6 | 'string': {
|
---|
7 | pattern: /```[\s\S]*?```|[hH]?(?:"(?:[^\r\n\\"]|\\.)*"|'(?:[^\r\n\\']|\\.)*'|@(?:"[^\r\n"]*"|'[^\r\n']*'))/,
|
---|
8 | greedy: true
|
---|
9 | },
|
---|
10 |
|
---|
11 | 'verb': {
|
---|
12 | pattern: /(\|\s*)[a-z][\w-]*/i,
|
---|
13 | lookbehind: true,
|
---|
14 | alias: 'keyword'
|
---|
15 | },
|
---|
16 |
|
---|
17 | 'command': {
|
---|
18 | pattern: /\.[a-z][a-z\d-]*\b/,
|
---|
19 | alias: 'keyword'
|
---|
20 | },
|
---|
21 |
|
---|
22 | 'class-name': /\b(?:bool|datetime|decimal|dynamic|guid|int|long|real|string|timespan)\b/,
|
---|
23 | 'keyword': /\b(?:access|alias|and|anti|as|asc|auto|between|by|(?:contains|(?:ends|starts)with|has(?:perfix|suffix)?)(?:_cs)?|database|declare|desc|external|from|fullouter|has_all|in|ingestion|inline|inner|innerunique|into|(?:left|right)(?:anti(?:semi)?|inner|outer|semi)?|let|like|local|not|of|on|or|pattern|print|query_parameters|range|restrict|schema|set|step|table|tables|to|view|where|with|matches\s+regex|nulls\s+(?:first|last))(?![\w-])/,
|
---|
24 | 'boolean': /\b(?:false|null|true)\b/,
|
---|
25 |
|
---|
26 | 'function': /\b[a-z_]\w*(?=\s*\()/,
|
---|
27 |
|
---|
28 | 'datetime': [
|
---|
29 | {
|
---|
30 | // RFC 822 + RFC 850
|
---|
31 | pattern: /\b(?:(?:Fri|Friday|Mon|Monday|Sat|Saturday|Sun|Sunday|Thu|Thursday|Tue|Tuesday|Wed|Wednesday)\s*,\s*)?\d{1,2}(?:\s+|-)(?:Apr|Aug|Dec|Feb|Jan|Jul|Jun|Mar|May|Nov|Oct|Sep)(?:\s+|-)\d{2}\s+\d{2}:\d{2}(?::\d{2})?(?:\s*(?:\b(?:[A-Z]|(?:[ECMT][DS]|GM|U)T)|[+-]\d{4}))?\b/,
|
---|
32 | alias: 'number'
|
---|
33 | },
|
---|
34 | {
|
---|
35 | // ISO 8601
|
---|
36 | pattern: /[+-]?\b(?:\d{4}-\d{2}-\d{2}(?:[ T]\d{2}:\d{2}(?::\d{2}(?:\.\d+)?)?)?|\d{2}:\d{2}(?::\d{2}(?:\.\d+)?)?)Z?/,
|
---|
37 | alias: 'number'
|
---|
38 | }
|
---|
39 | ],
|
---|
40 | 'number': /\b(?:0x[0-9A-Fa-f]+|\d+(?:\.\d+)?(?:[Ee][+-]?\d+)?)(?:(?:min|sec|[mnµ]s|[dhms]|microsecond|tick)\b)?|[+-]?\binf\b/,
|
---|
41 |
|
---|
42 | 'operator': /=>|[!=]~|[!=<>]=?|[-+*/%|]|\.\./,
|
---|
43 | 'punctuation': /[()\[\]{},;.:]/
|
---|
44 | };
|
---|
Note:
See
TracBrowser
for help on using the repository browser.