7 lines
21 KiB
JavaScript
7 lines
21 KiB
JavaScript
|
const lang = Object.freeze({ "displayName": "Kusto", "fileTypes": ["csl", "kusto", "kql"], "name": "kusto", "patterns": [{ "comment": "Tabular operators: common helper operators", "match": "\\b(by|from|of|to|step|with)\\b", "name": "keyword.other.operator.kusto" }, { "comment": "Query statements: https://docs.microsoft.com/en-us/azure/kusto/query/statements", "match": "\\b(let|set|alias|declare|pattern|query_parameters|restrict|access|set)\\b", "name": "keyword.control.kusto" }, { "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/datatypes-string-operators", "match": "\\b(and|or|has_all|has_any|matches|regex)\\b", "name": "keyword.other.operator.kusto" }, { "captures": { "1": { "name": "support.function.kusto" }, "2": { "patterns": [{ "include": "#Strings" }] } }, "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/clusterfunction", "match": "\\b(cluster|database)(?:\\s*\\(\\s*(.+?)\\s*\\))?(?!\\w)", "name": "meta.special.database.kusto" }, { "comment": "Special functions: https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/tablefunction", "match": "\\b(external_table|materialized_view|materialize|table|toscalar)\\b", "name": "support.function.kusto" }, { "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/betweenoperator", "match": "(?<!\\w)(!?between)\\b", "name": "keyword.other.operator.kusto" }, { "captures": { "1": { "name": "support.function.kusto" }, "2": { "patterns": [{ "include": "#Numeric" }] }, "3": { "patterns": [{ "include": "#Numeric" }] } }, "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/binoperators", "match": "\\b(binary_and|binary_or|binary_shift_left|binary_shift_right|binary_xor)(?:\\s*\\(\\s*(\\w+)\\s*,\\s*(\\w+)\\s*\\))?(?!\\w)", "name": "meta.scalar.bitwise.kusto" }, { "captures": { "1": { "name": "support.function.kusto" }, "2": { "patterns": [{ "include": "#Numeric" }] } }, "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/binary-notfunction", "match": "\\b(binary_not|bitset_count_ones)(?:\\s*\\(\\s*(\\w+)\\s*\\))?(?!\\w)", "name": "meta.scalar.bitwise.kusto" }, { "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/in-cs-operator", "match": "(?<!\\w)(!?in~?)(?!\\w)", "name": "keyword.other.operator.kusto" }, { "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/datatypes-string-operators", "match": "(?<!\\w)(!?(?:contains|endswith|hasprefix|hassuffix|has|startswith)(?:_cs)?)(?!\\w)", "name": "keyword.other.operator.kusto" }, { "captures": { "1": { "name": "support.function.kusto" }, "2": { "patterns": [{ "include": "#DateTimeTimeSpanDataTypes" }, { "include": "#TimeSpanLiterals" }, { "include": "#DateTimeTimeSpanFunctions" }, { "include": "#Numeric" }] }, "3": { "patterns": [{ "include": "#DateTimeTimeSpanDataTypes" }, { "include": "#TimeSpanLiterals" }, { "include": "#DateTimeTimeSpanFunctions" }, { "include": "#Numeric" }] }, "4": { "patterns": [{ "include": "#DateTimeTimeSpanDataTypes" }, { "include": "#TimeSpanLiterals" }, { "include": "#DateTimeTimeSpanFunctions" }, { "include": "#Numeric" }] } }, "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/rangefunction", "match": "\\b(range)\\s*\\((?:\\s*(\\w+(?:\\(.*?\\))?)\\s*,\\s*(\\w+(?:\\(.*?\\))?)\\s*,?(?:\\s*)?(\\w+(?:\\(.*?\\))?)?\\s*\\))?(?!\\w)", "name": "meta.scalar.function.range.kusto" }, { "comment": "https://learn.microsoft.com/en-us/azure/data-explorer/kusto/query/scalarfunctions", "match": "\\b(abs|acos|around|array_concat|array_iff|array_index_of|array_length|array_reverse|array_rotate_left|array_rotate_right|array_shift_left|array_shift_right|array_slice|array_sort_asc|array_sort_desc|array_split|array_sum|asin|assert|atan2|atan|bag_has_key|bag_keys|bag_merge|bag_remove_keys|base64_decode_toarray|base64_decode_tostring|base64_decode_toguid|base64_encode_fromarray|base64_encode_tostring|base64_encode_fromguid|beta_cdf|beta_inv|beta_pdf|bin_at|bin_auto|case|ceiling|coalesce|column_ifexists|convert_angle
|
||
|
var kusto = [
|
||
|
lang
|
||
|
];
|
||
|
|
||
|
export { kusto as default };
|