monaco-yql-languages 1.12.0 → 1.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/completion.js +7 -1
- package/build/monaco.contribution.d.ts +4 -0
- package/build/monaco.contribution.js +4 -0
- package/build/yql_unstable/YQL.monarch.json +83 -0
- package/build/yql_unstable/YQLs.monarch.json +59 -0
- package/build/yql_unstable/yql.contribution.d.ts +1 -0
- package/build/yql_unstable/yql.contribution.js +12 -0
- package/build/yql_unstable/yql.d.ts +7 -0
- package/build/yql_unstable/yql.js +68 -0
- package/build/yql_unstable/yql_ansi.contribution.d.ts +1 -0
- package/build/yql_unstable/yql_ansi.contribution.js +12 -0
- package/package.json +1 -1
package/build/completion.js
CHANGED
|
@@ -36,6 +36,7 @@ export function provideCompletionItems(getCompletionList, preserveOrder, getFilt
|
|
|
36
36
|
//languages.CompletionItemKind.Text
|
|
37
37
|
let kind = 18;
|
|
38
38
|
let label;
|
|
39
|
+
let beforeCursorPart;
|
|
39
40
|
let serverFilterText = '';
|
|
40
41
|
let serverDocumentation;
|
|
41
42
|
let serverDetail;
|
|
@@ -45,10 +46,12 @@ export function provideCompletionItems(getCompletionList, preserveOrder, getFilt
|
|
|
45
46
|
serverFilterText = filterText;
|
|
46
47
|
}
|
|
47
48
|
label = text;
|
|
49
|
+
beforeCursorPart = text;
|
|
48
50
|
kind = (_a = YqlCompletionTypeToMonacoKind[type]) !== null && _a !== void 0 ? _a : 18;
|
|
49
51
|
if (shift) {
|
|
50
52
|
const pos = text.length - shift;
|
|
51
53
|
labelAsSnippet = text.slice(0, pos) + '$0' + text.slice(pos);
|
|
54
|
+
beforeCursorPart = text.slice(0, pos);
|
|
52
55
|
}
|
|
53
56
|
if (documentation) {
|
|
54
57
|
serverDocumentation = { value: documentation };
|
|
@@ -57,6 +60,7 @@ export function provideCompletionItems(getCompletionList, preserveOrder, getFilt
|
|
|
57
60
|
}
|
|
58
61
|
else {
|
|
59
62
|
label = item;
|
|
63
|
+
beforeCursorPart = item;
|
|
60
64
|
}
|
|
61
65
|
const suggest = label.length > 1
|
|
62
66
|
? label.slice(0, -1).replace(/[/[]/g, '\\\\$&') + label.slice(-1)
|
|
@@ -83,7 +87,9 @@ export function provideCompletionItems(getCompletionList, preserveOrder, getFilt
|
|
|
83
87
|
insertText: labelAsSnippet || suggest,
|
|
84
88
|
//4 - languages.CompletionItemInsertTextRule.InsertAsSnippet
|
|
85
89
|
insertTextRules: labelAsSnippet ? 4 : undefined,
|
|
86
|
-
command:
|
|
90
|
+
command: beforeCursorPart.endsWith('/') ||
|
|
91
|
+
beforeCursorPart.endsWith('.`') ||
|
|
92
|
+
beforeCursorPart.endsWith('::')
|
|
87
93
|
? { id: 'editor.action.triggerSuggest', title: '' }
|
|
88
94
|
: undefined,
|
|
89
95
|
//@ts-ignore
|
|
@@ -4,3 +4,7 @@ import './themes/themes.contribution';
|
|
|
4
4
|
import './yql/yql.contribution';
|
|
5
5
|
import './yql/yql_ansi.contribution';
|
|
6
6
|
import './yql/yql.keywords';
|
|
7
|
+
import './yql_unstable/yql.contribution';
|
|
8
|
+
import './yql_unstable/YQL.monarch.json';
|
|
9
|
+
import './yql_unstable/YQLs.monarch.json';
|
|
10
|
+
import './yql_unstable/yql_ansi.contribution';
|
|
@@ -4,3 +4,7 @@ import './themes/themes.contribution';
|
|
|
4
4
|
import './yql/yql.contribution';
|
|
5
5
|
import './yql/yql_ansi.contribution';
|
|
6
6
|
import './yql/yql.keywords';
|
|
7
|
+
import './yql_unstable/yql.contribution';
|
|
8
|
+
import './yql_unstable/YQL.monarch.json';
|
|
9
|
+
import './yql_unstable/YQLs.monarch.json';
|
|
10
|
+
import './yql_unstable/yql_ansi.contribution';
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
{
|
|
2
|
+
"tokenizer": {
|
|
3
|
+
"root": [
|
|
4
|
+
{
|
|
5
|
+
"include": "@whitespace"
|
|
6
|
+
},
|
|
7
|
+
["(((\\\/\\*(.|\\n)*?\\*\\\/)|(\\-\\-[^\\n\\r]*(\\r\\n?|\\n|$))))", "comment"],
|
|
8
|
+
[
|
|
9
|
+
"\\b(([a-z]|[A-Z]|_)([a-z]|[A-Z]|_|[0-9])*\\:\\:([a-z]|[A-Z]|_)([a-z]|[A-Z]|_|[0-9])*)\\b",
|
|
10
|
+
"support.function"
|
|
11
|
+
],
|
|
12
|
+
["\\b(([a-z]|[A-Z]|_)([a-z]|[A-Z]|_|[0-9])*)(?=\\()\\b", "support.function"],
|
|
13
|
+
["\\b(([a-z]|[A-Z]|_)([a-z]|[A-Z]|_|[0-9])*)(?=\\\u003C)\\b", "keyword.type"],
|
|
14
|
+
[
|
|
15
|
+
"\\b(pgpg_brin_minmax_multi_summary|pganycompatiblemultirange|pgpg_brin_bloom_summary|pganycompatiblenonarray|pganycompatiblerange|pganycompatiblearray|pglanguage_handler|pgtable_am_handler|pgindex_am_handler|_pgint8multirange|_pgint4multirange|_pgdatemultirange|pgpg_dependencies|_pgtstzmultirange|_pgnummultirange|pgdatemultirange|pgpg_ddl_command|pgint4multirange|_pgtxid_snapshot|pgtstzmultirange|pgint8multirange|_pgregdictionary|pganycompatible|pgevent_trigger|pgnummultirange|_pgtsmultirange|_pgpg_attribute|pganymultirange|_pgregprocedure|_pgregcollation|pgregdictionary|pgtxid_snapshot|_pgregnamespace|pgpg_ndistinct|_pgregoperator|pgregcollation|pgregprocedure|pgpg_attribute|_pgpg_snapshot|pgtsmultirange|pgregnamespace|pgpg_node_tree|_pgtimestamptz|pgregoperator|pgpg_mcv_list|pgtimestamptz|pgtsm_handler|TzTimestamp64|_pgint2vector|pganynonarray|pgpg_snapshot|pgfdw_handler|_pgtimestamp|_pgtstzrange|pgint2vector|_pgdaterange|_pgregconfig|_pggtsvector|TzDatetime64|_pgrefcursor|pganyelement|_pgint4range|JsonDocument|_pgint8range|_pgoidvector|_pgregclass|_pgtsvector|pgint8range|pgint4range|pgtstzrange|_pgmacaddr8|pggtsvector|pgdaterange|Timestamp64|TzTimestamp|_pgnumrange|pgtimestamp|_pginterval|_pgjsonpath|pgrefcursor|_pgpg_class|pgregconfig|pgoidvector|_pgpg_proc|_pgpg_type|pganyrange|_pgpolygon|_pgnumeric|pganyarray|TzDatetime|Interval64|_pgmacaddr|pgnumrange|_pgcstring|_pgregoper|pgtsvector|_pgregproc|pgmacaddr8|_pgregrole|_pgregtype|pgregclass|_pgvarchar|pgpg_class|Datetime64|pgjsonpath|pginternal|_pgaclitem|_pgtsquery|_pgtsrange|pginterval|Timestamp|pgpg_type|_pgbpchar|_pgtimetz|_pgpg_lsn|pgregoper|pgregrole|EmptyDict|pgmacaddr|pgaclitem|EmptyList|pgunknown|pgregtype|_pgcircle|_pgfloat4|pgtrigger|_pgfloat8|_pgvarbit|pganyenum|pgnumeric|pgvarchar|_pgrecord|pgtsrange|pgpolygon|pgtsquery|pgcstring|pgpg_proc|pgregproc|TzDate32|pgpg_lsn|pgcircle|pgbpchar|_pgpoint|pgrecord|Datetime|_pgjsonb|Interval|pgfloat4|pgfloat8|_pgmoney|pgtimetz|_pgbytea|pgvarbit|DyNumber|pgbytea|_pgint8|_pglseg|_pgxid8|_pgpath|_pgline|_pguuid|_pgbool|Generic|pgjsonb|_pgjson|_pgchar|_pgtime|_pgname|_pgtext|_pgcidr|pgmoney|_pgdate|_pginet|_pgint2|pgpoint|_pgint4|_pgxid|pgtext|pguuid|pgname|pglseg|pgline|pgjson|pgint8|pgint4|pgint2|pginet|pgdate|pgcidr|String|pgchar|TzDate|pgbool|Uint16|Uint32|_pgxml|Uint64|pgxid8|_pgtid|_pgoid|_pgcid|_pgbox|_pgbit|pgpath|Double|pgvoid|Date32|pgtime|Int16|pgtid|pgxid|Uint8|pgxml|pgany|pgbit|pgbox|pgcid|pgoid|Float|Int64|Int32|Yson|Int8|Json|Unit|Utf8|Uuid|Void|Date|Bool)\\b",
|
|
16
|
+
"keyword.type"
|
|
17
|
+
],
|
|
18
|
+
[
|
|
19
|
+
"\\b(CURRENT_TIMESTAMP|MATCH_RECOGNIZE|UNCONDITIONAL|AUTOINCREMENT|EMPTY_ACTION|MILLISECONDS|MICROSECONDS|CURRENT_DATE|CURRENT_TIME|REPLICATION|INCREMENTAL|NANOSECONDS|CONDITIONAL|TRANSACTION|TABLESAMPLE|JSON_EXISTS|CHANGEFEED|DEFERRABLE|JSON_QUERY|REPEATABLE|PRIVILEGES|CONSTRAINT|CLASSIFIER|REFERENCES|COLLECTION|ATTRIBUTES|JSON_VALUE|ASYMMETRIC|TABLESTORE|UNMATCHED|PRECEDING|TEMPORARY|BERNOULLI|EXCLUSION|PARTITION|SYMMETRIC|EXCLUSIVE|DIRECTORY|UNBOUNDED|STREAMING|INTERSECT|INCREMENT|INITIALLY|ENCRYPTED|IMMEDIATE|SAVEPOINT|FOLLOWING|WATERMARK|RETURNING|DATABASE|PARALLEL|OPTIONAL|EXTERNAL|DEFERRED|DISTINCT|FUNCTION|SUBQUERY|TRANSFER|PASSWORD|MEASURES|RESOURCE|SEQUENCE|CONSUMER|RESTRICT|CONFLICT|EVALUATE|DESCRIBE|CALLABLE|INHERITS|GROUPING|ROLLBACK|BETWEEN|COLUMNS|COLLATE|INSTEAD|AUTOMAP|NOLOGIN|DECIMAL|PROCESS|CONNECT|DEFAULT|REINDEX|PERMUTE|CURRENT|TRIGGER|DECLARE|CASCADE|REPLACE|SECONDS|DISCARD|NOTNULL|PASSING|COMPACT|SYMBOLS|NATURAL|RELEASE|ANALYZE|MATCHES|RESTORE|EXPLAIN|PRESORT|WITHOUT|UNKNOWN|BITCAST|WRAPPER|INITIAL|VARIANT|RESTART|EXCLUDE|PRIMARY|VIRTUAL|RESPECT|DISABLE|FLATTEN|PATTERN|INDEXED|FOREIGN|IMPORT|PRAGMA|ISNULL|SCHEMA|REVERT|RENAME|RETURN|ESCAPE|VALUES|OTHERS|ASSUME|ACTION|RESULT|STREAM|DETACH|CREATE|REDUCE|BEFORE|TABLES|DELETE|SYSTEM|SUBSET|EXCEPT|FAMILY|ROLLUP|ATTACH|BACKUP|UPSERT|UPDATE|LEGACY|SAMPLE|TAGGED|VACUUM|REVOKE|MANAGE|SOURCE|GROUPS|GLOBAL|REMOVE|OBJECT|REGEXP|IGNORE|OPTION|EXPORT|FILTER|WINDOW|DEFINE|SELECT|UNIQUE|COLUMN|HAVING|EXISTS|INSERT|STRUCT|MODIFY|COMMIT|OFFSET|WHERE|FIRST|RLIKE|MATCH|LOGIN|GRANT|UNION|RAISE|ERROR|LOCAL|ORDER|USING|RANGE|TABLE|ASYNC|START|AFTER|ERASE|RESET|BATCH|INNER|NULLS|CROSS|TUPLE|FALSE|TOPIC|QUERY|EMPTY|ALTER|COVER|ILIKE|CHECK|GROUP|QUEUE|RIGHT|ABORT|INDEX|OWNER|OUTER|ARRAY|BEGIN|LIMIT|HASH|PLAN|SETS|OMIT|GLOB|ELSE|CUBE|ENUM|OVER|ANSI|SEEK|DESC|SYNC|DATA|WHEN|SEMI|EACH|USER|THEN|LEFT|CAST|FLOW|VIEW|FAIL|ONLY|FROM|JOIN|TIES|TEMP|TRUE|WITH|LIST|ROWS|LIKE|LAST|DICT|NEXT|POOL|DROP|SHOW|INTO|CASE|FULL|PAST|TYPE|SKIP|NULL|PER|NOT|AND|ASC|SET|USE|ONE|HOP|KEY|END|ROW|XOR|ALL|FOR|ADD|ANY|TO|IN|IF|AT|ON|BY|AS|OR|DO|IS|OF|NO)\\b",
|
|
20
|
+
"keyword"
|
|
21
|
+
],
|
|
22
|
+
["(\\`(\\\\(.|\\n)|\\`\\`|[^`\\\\])*\\`)", "string.tablepath"],
|
|
23
|
+
["(\\$([a-z]|[A-Z]|_)([a-z]|[A-Z]|_|[0-9])*)", "variable"],
|
|
24
|
+
["\\b(([a-z]|[A-Z]|_)([a-z]|[A-Z]|_|[0-9])*)\\b", "identifier"],
|
|
25
|
+
[
|
|
26
|
+
"\\b((([0-9]+)\\.[0-9]*([eE](\\+|\\-)?([0-9]+))?|([0-9]+)([eE](\\+|\\-)?([0-9]+)))([fF]|[pP]([fF](4|8)|[nN])?)?)\\b",
|
|
27
|
+
"number"
|
|
28
|
+
],
|
|
29
|
+
[
|
|
30
|
+
"\\b(((0[xX]([0-9]|[a-f]|[A-F])+)|(0[oO][0-8]+)|(0[bB](0|1)+)|([0-9]+))(([pP]|[uU])?([lL]|[sS]|[tT]|[iI]|[bB]|[nN])?))\\b",
|
|
31
|
+
"number"
|
|
32
|
+
],
|
|
33
|
+
["\\b((0[xX]([0-9]|[a-f]|[A-F])+)|(0[oO][0-8]+)|(0[bB](0|1)+)|([0-9]+))\\b", "number"],
|
|
34
|
+
[
|
|
35
|
+
"(((((\\\u0027([^\u0027\\\\]|(\\\\(.|\\n)))*\\\u0027))|((\\\"([^\"\\\\]|(\\\\(.|\\n)))*\\\"))|((\\@\\@(.|\\n)*?\\@\\@)+\\@?))([sS]|[uU]|[yY]|[jJ]|[pP]([tT]|[bB]|[vV])?)?))",
|
|
36
|
+
"string"
|
|
37
|
+
]
|
|
38
|
+
],
|
|
39
|
+
"whitespace": [
|
|
40
|
+
["(( |\\r|\\t|\\f|\\n))", "white"],
|
|
41
|
+
["\\\/\\*", "comment", "@comment"],
|
|
42
|
+
["\\@\\@", "string", "@stringLiteral"]
|
|
43
|
+
],
|
|
44
|
+
"comment": [
|
|
45
|
+
["[^\\\/\\*]", "comment"],
|
|
46
|
+
["\\*\\\/", "comment", "@pop"],
|
|
47
|
+
["\\\/\\*", "comment"]
|
|
48
|
+
],
|
|
49
|
+
"stringLiteral": [
|
|
50
|
+
[
|
|
51
|
+
"#py",
|
|
52
|
+
{
|
|
53
|
+
"nextEmbedded": "python",
|
|
54
|
+
"goBack": 3,
|
|
55
|
+
"next": "@embedded",
|
|
56
|
+
"token": "string.python"
|
|
57
|
+
}
|
|
58
|
+
],
|
|
59
|
+
[
|
|
60
|
+
"\\\/\\\/js",
|
|
61
|
+
{
|
|
62
|
+
"nextEmbedded": "javascript",
|
|
63
|
+
"goBack": 4,
|
|
64
|
+
"next": "@embedded",
|
|
65
|
+
"token": "string.js"
|
|
66
|
+
}
|
|
67
|
+
],
|
|
68
|
+
["[^\\@\\@]", "string"],
|
|
69
|
+
["\\@\\@", "string", "@pop"],
|
|
70
|
+
["\\@\\@", "string"]
|
|
71
|
+
],
|
|
72
|
+
"embedded": [
|
|
73
|
+
[
|
|
74
|
+
"([^@]|^)([@]{4})*[@]{2}([@]([^@]|$)|[^@]|$)",
|
|
75
|
+
{
|
|
76
|
+
"nextEmbedded": "@pop",
|
|
77
|
+
"next": "@pop",
|
|
78
|
+
"token": "@rematch"
|
|
79
|
+
}
|
|
80
|
+
]
|
|
81
|
+
]
|
|
82
|
+
}
|
|
83
|
+
}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
{
|
|
2
|
+
"tokenizer": {
|
|
3
|
+
"root": [
|
|
4
|
+
{
|
|
5
|
+
"include": "@whitespace"
|
|
6
|
+
},
|
|
7
|
+
["(#.*)", "comment"],
|
|
8
|
+
[
|
|
9
|
+
"(set_package_version|override_library|declare|library|package|return|lambda|import|export|quote|block|let)",
|
|
10
|
+
"keyword"
|
|
11
|
+
],
|
|
12
|
+
["\\b(world)\\b", "variable"],
|
|
13
|
+
["([A-Za-z_\\-0-9]+!)", "string.tablepath"],
|
|
14
|
+
["([A-Z][A-Za-z_\\-0-9]*)", "support.function"],
|
|
15
|
+
["(\u0027[A-Za-z_\\-0-9]+\\.[A-Za-z_\\-0-9]+)", "support.function"],
|
|
16
|
+
["(\u0027[A-Za-z_\\-0-9]+)", "number"],
|
|
17
|
+
["\\b([a-z_0-9][A-Za-z_\\-0-9]*)\\b", "identifier"],
|
|
18
|
+
["(\\\"[^\\\"\\n]*\\\")", "string"],
|
|
19
|
+
["(\\@\\@(.|\\n)*\\@\\@)", "string"]
|
|
20
|
+
],
|
|
21
|
+
"whitespace": [
|
|
22
|
+
["(\\s+)", "white"],
|
|
23
|
+
["\\@\\@", "string", "@stringLiteral"]
|
|
24
|
+
],
|
|
25
|
+
"stringLiteral": [
|
|
26
|
+
[
|
|
27
|
+
"#py",
|
|
28
|
+
{
|
|
29
|
+
"nextEmbedded": "python",
|
|
30
|
+
"goBack": 3,
|
|
31
|
+
"next": "@embedded",
|
|
32
|
+
"token": "string.python"
|
|
33
|
+
}
|
|
34
|
+
],
|
|
35
|
+
[
|
|
36
|
+
"\\\/\\\/js",
|
|
37
|
+
{
|
|
38
|
+
"nextEmbedded": "javascript",
|
|
39
|
+
"goBack": 4,
|
|
40
|
+
"next": "@embedded",
|
|
41
|
+
"token": "string.js"
|
|
42
|
+
}
|
|
43
|
+
],
|
|
44
|
+
["[^\\@\\@]", "string"],
|
|
45
|
+
["\\@\\@", "string", "@pop"],
|
|
46
|
+
["[\\@\\@]", "string"]
|
|
47
|
+
],
|
|
48
|
+
"embedded": [
|
|
49
|
+
[
|
|
50
|
+
"([^@]|^)([@]{4})*[@]{2}([@]([^@]|$)|[^@]|$)",
|
|
51
|
+
{
|
|
52
|
+
"nextEmbedded": "@pop",
|
|
53
|
+
"next": "@pop",
|
|
54
|
+
"token": "@rematch"
|
|
55
|
+
}
|
|
56
|
+
]
|
|
57
|
+
]
|
|
58
|
+
}
|
|
59
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const LANGUAGE_ID = "yql_unstable";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { registerLanguage } from '../_.contribution';
|
|
2
|
+
export const LANGUAGE_ID = 'yql_unstable';
|
|
3
|
+
registerLanguage({
|
|
4
|
+
id: LANGUAGE_ID,
|
|
5
|
+
extensions: [],
|
|
6
|
+
loader: () => import('./yql').then((module) => {
|
|
7
|
+
return {
|
|
8
|
+
conf: module.conf,
|
|
9
|
+
language: module.getLanguage(),
|
|
10
|
+
};
|
|
11
|
+
}),
|
|
12
|
+
});
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { languages } from '../fillers/monaco-editor-core';
|
|
2
|
+
export declare const conf: languages.LanguageConfiguration;
|
|
3
|
+
interface LanguageOptions {
|
|
4
|
+
ansi?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export declare function getLanguage({ ansi }?: LanguageOptions): languages.IMonarchLanguage & Record<string, unknown>;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { tokenizer } from './YQL.monarch.json';
|
|
2
|
+
import { tokenizer as tokenizerAnsi } from './YQLs.monarch.json';
|
|
3
|
+
export const conf = {
|
|
4
|
+
comments: {
|
|
5
|
+
lineComment: '--',
|
|
6
|
+
blockComment: ['/*', '*/'],
|
|
7
|
+
},
|
|
8
|
+
brackets: [
|
|
9
|
+
['{', '}'],
|
|
10
|
+
['[', ']'],
|
|
11
|
+
['(', ')'],
|
|
12
|
+
],
|
|
13
|
+
autoClosingPairs: [
|
|
14
|
+
{ open: '{', close: '}' },
|
|
15
|
+
{ open: '[', close: ']' },
|
|
16
|
+
{ open: '(', close: ')' },
|
|
17
|
+
{ open: '"', close: '"', notIn: ['string'] },
|
|
18
|
+
{ open: "'", close: "'", notIn: ['string', 'comment'] },
|
|
19
|
+
{ open: '`', close: '`', notIn: ['string', 'comment'] },
|
|
20
|
+
],
|
|
21
|
+
surroundingPairs: [
|
|
22
|
+
{ open: '{', close: '}' },
|
|
23
|
+
{ open: '[', close: ']' },
|
|
24
|
+
{ open: '(', close: ')' },
|
|
25
|
+
{ open: '"', close: '"' },
|
|
26
|
+
{ open: "'", close: "'" },
|
|
27
|
+
{ open: '`', close: '`' },
|
|
28
|
+
],
|
|
29
|
+
wordPattern: /(-?\d*\.\d\w*)|([^`~!@#%^&*()\-=+[{\]}\\|;:'",./?\s]+)/g,
|
|
30
|
+
};
|
|
31
|
+
export function getLanguage({ ansi = false } = {}) {
|
|
32
|
+
return {
|
|
33
|
+
defaultToken: 'text',
|
|
34
|
+
ignoreCase: true,
|
|
35
|
+
brackets: [
|
|
36
|
+
{ open: '[', close: ']', token: 'delimiter.square' },
|
|
37
|
+
{ open: '(', close: ')', token: 'delimiter.parenthesis' },
|
|
38
|
+
{ open: '{', close: '}', token: 'delimiter.curly' },
|
|
39
|
+
],
|
|
40
|
+
constants: ['true', 'false', 'enabled', 'disabled'],
|
|
41
|
+
operators: [
|
|
42
|
+
'+',
|
|
43
|
+
'-',
|
|
44
|
+
'/',
|
|
45
|
+
'//',
|
|
46
|
+
'%',
|
|
47
|
+
'<@>',
|
|
48
|
+
'@>',
|
|
49
|
+
'<@',
|
|
50
|
+
'&',
|
|
51
|
+
'^',
|
|
52
|
+
'~',
|
|
53
|
+
'<',
|
|
54
|
+
'>',
|
|
55
|
+
'<=',
|
|
56
|
+
'>=',
|
|
57
|
+
'=>',
|
|
58
|
+
'==',
|
|
59
|
+
'!=',
|
|
60
|
+
'<>',
|
|
61
|
+
'=',
|
|
62
|
+
],
|
|
63
|
+
symbols: /[=><!~?:&|+\-*/^%]+/,
|
|
64
|
+
escapes: /\\(?:[abfnrtv\\"'`]|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
|
|
65
|
+
variables: /[a-zA-Z_]\w*/,
|
|
66
|
+
tokenizer: (ansi ? tokenizerAnsi : tokenizer),
|
|
67
|
+
};
|
|
68
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const LANGUAGE_ID = "yql_ansi_unstable";
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { registerLanguage } from '../_.contribution';
|
|
2
|
+
export const LANGUAGE_ID = 'yql_ansi_unstable';
|
|
3
|
+
registerLanguage({
|
|
4
|
+
id: LANGUAGE_ID,
|
|
5
|
+
extensions: [],
|
|
6
|
+
loader: () => import('./yql').then((module) => {
|
|
7
|
+
return {
|
|
8
|
+
conf: module.conf,
|
|
9
|
+
language: module.getLanguage({ ansi: true }),
|
|
10
|
+
};
|
|
11
|
+
}),
|
|
12
|
+
});
|