monaco-yql-languages 1.12.1 → 1.14.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/monaco.contribution.d.ts +6 -0
- package/build/monaco.contribution.js +6 -0
- package/build/s-expressions_unstable/YQLs.monarch.json +59 -0
- package/build/s-expressions_unstable/s-expressions.contribution.d.ts +1 -0
- package/build/s-expressions_unstable/s-expressions.contribution.js +7 -0
- package/build/s-expressions_unstable/s-expressions.d.ts +4 -0
- package/build/s-expressions_unstable/s-expressions.js +34 -0
- package/build/yql_unstable/YQL.monarch.json +83 -0
- package/build/yql_unstable/YQLansi.monarch.json +84 -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
|
@@ -4,3 +4,9 @@ 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/YQLansi.monarch.json';
|
|
10
|
+
import './yql_unstable/yql_ansi.contribution';
|
|
11
|
+
import './s-expressions_unstable/s-expressions.contribution';
|
|
12
|
+
import './s-expressions_unstable/YQLs.monarch.json';
|
|
@@ -4,3 +4,9 @@ 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/YQLansi.monarch.json';
|
|
10
|
+
import './yql_unstable/yql_ansi.contribution';
|
|
11
|
+
import './s-expressions_unstable/s-expressions.contribution';
|
|
12
|
+
import './s-expressions_unstable/YQLs.monarch.json';
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
{
|
|
2
|
+
"tokenizer": {
|
|
3
|
+
"root": [
|
|
4
|
+
{
|
|
5
|
+
"include": "@whitespace"
|
|
6
|
+
},
|
|
7
|
+
["(#.*)", "comment"],
|
|
8
|
+
[
|
|
9
|
+
"(set_package_version|override_library|package|library|declare|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 = "s-expression_unstable";
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { tokenizer } from './YQLs.monarch.json';
|
|
2
|
+
export const LANGUAGE_ID = 's-expressions';
|
|
3
|
+
export const conf = {
|
|
4
|
+
comments: {
|
|
5
|
+
lineComment: '#',
|
|
6
|
+
},
|
|
7
|
+
brackets: [
|
|
8
|
+
['{', '}'],
|
|
9
|
+
['[', ']'],
|
|
10
|
+
['(', ')'],
|
|
11
|
+
],
|
|
12
|
+
autoClosingPairs: [
|
|
13
|
+
{ open: '{', close: '}' },
|
|
14
|
+
{ open: '[', close: ']' },
|
|
15
|
+
{ open: '(', close: ')' },
|
|
16
|
+
],
|
|
17
|
+
surroundingPairs: [
|
|
18
|
+
{ open: '{', close: '}' },
|
|
19
|
+
{ open: '[', close: ']' },
|
|
20
|
+
{ open: '(', close: ')' },
|
|
21
|
+
],
|
|
22
|
+
};
|
|
23
|
+
export const language = {
|
|
24
|
+
defaultToken: 'text',
|
|
25
|
+
ignoreCase: true,
|
|
26
|
+
tokenPostfix: '.yql',
|
|
27
|
+
brackets: [
|
|
28
|
+
{ open: '[', close: ']', token: 'delimiter.square' },
|
|
29
|
+
{ open: '(', close: ')', token: 'delimiter.parenthesis' },
|
|
30
|
+
{ open: '{', close: '}', token: 'delimiter.curly' },
|
|
31
|
+
],
|
|
32
|
+
escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
|
|
33
|
+
tokenizer: tokenizer,
|
|
34
|
+
};
|
|
@@ -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|pgtable_am_handler|pglanguage_handler|pgindex_am_handler|pgpg_dependencies|_pgtstzmultirange|_pgint8multirange|_pgint4multirange|_pgdatemultirange|pgtstzmultirange|pgpg_ddl_command|pgint8multirange|pgint4multirange|pgdatemultirange|_pgtxid_snapshot|_pgregdictionary|_pgnummultirange|pgtxid_snapshot|pgregdictionary|pgnummultirange|pgevent_trigger|pganymultirange|pganycompatible|_pgtsmultirange|_pgregprocedure|_pgregnamespace|_pgregcollation|_pgpg_attribute|pgtsmultirange|pgregprocedure|pgregnamespace|pgregcollation|pgpg_node_tree|pgpg_ndistinct|pgpg_attribute|_pgtimestamptz|_pgregoperator|_pgpg_snapshot|pgtsm_handler|pgtimestamptz|pgregoperator|pgpg_snapshot|pgpg_mcv_list|pgfdw_handler|pganynonarray|_pgint2vector|TzTimestamp64|pgint2vector|pganyelement|_pgtstzrange|_pgtimestamp|_pgregconfig|_pgrefcursor|_pgoidvector|_pgint8range|_pgint4range|_pggtsvector|_pgdaterange|TzDatetime64|JsonDocument|pgtstzrange|pgtimestamp|pgregconfig|pgrefcursor|pgoidvector|pgint8range|pgint4range|pggtsvector|pgdaterange|_pgtsvector|_pgregclass|_pgpg_class|_pgnumrange|_pgmacaddr8|_pgjsonpath|_pginterval|TzTimestamp|Timestamp64|pgtsvector|pgregclass|pgpg_class|pgnumrange|pgmacaddr8|pgjsonpath|pginterval|pginternal|pganyrange|pganyarray|_pgvarchar|_pgtsrange|_pgtsquery|_pgregtype|_pgregrole|_pgregproc|_pgregoper|_pgpolygon|_pgpg_type|_pgpg_proc|_pgnumeric|_pgmacaddr|_pgcstring|_pgaclitem|TzDatetime|Interval64|Datetime64|pgvarchar|pgunknown|pgtsrange|pgtsquery|pgtrigger|pgregtype|pgregrole|pgregproc|pgregoper|pgpolygon|pgpg_type|pgpg_proc|pgnumeric|pgmacaddr|pgcstring|pganyenum|pgaclitem|_pgvarbit|_pgtimetz|_pgrecord|_pgpg_lsn|_pgfloat8|_pgfloat4|_pgcircle|_pgbpchar|Timestamp|EmptyList|EmptyDict|pgvarbit|pgtimetz|pgrecord|pgpg_lsn|pgfloat8|pgfloat4|pgcircle|pgbpchar|_pgpoint|_pgmoney|_pgjsonb|_pgbytea|TzDate32|Interval|DyNumber|Datetime|pgpoint|pgmoney|pgjsonb|pgbytea|_pgxid8|_pguuid|_pgtime|_pgtext|_pgpath|_pgname|_pglseg|_pgline|_pgjson|_pgint8|_pgint4|_pgint2|_pginet|_pgdate|_pgcidr|_pgchar|_pgbool|Generic|pgxid8|pgvoid|pguuid|pgtime|pgtext|pgpath|pgname|pglseg|pgline|pgjson|pgint8|pgint4|pgint2|pginet|pgdate|pgcidr|pgchar|pgbool|_pgxml|_pgxid|_pgtid|_pgoid|_pgcid|_pgbox|_pgbit|Uint64|Uint32|Uint16|TzDate|String|Double|Date32|pgxml|pgxid|pgtid|pgoid|pgcid|pgbox|pgbit|pgany|Uint8|Int64|Int32|Int16|Float|Yson|Void|Uuid|Utf8|Unit|Json|Int8|Date|Bool)\\b",
|
|
16
|
+
"keyword.type"
|
|
17
|
+
],
|
|
18
|
+
[
|
|
19
|
+
"\\b(CURRENT_TIMESTAMP|MATCH_RECOGNIZE|UNCONDITIONAL|AUTOINCREMENT|MILLISECONDS|MICROSECONDS|EMPTY_ACTION|CURRENT_TIME|CURRENT_DATE|TRANSACTION|TABLESAMPLE|REPLICATION|NANOSECONDS|JSON_EXISTS|INCREMENTAL|CONDITIONAL|TABLESTORE|REPEATABLE|REFERENCES|PRIVILEGES|JSON_VALUE|JSON_QUERY|DEFERRABLE|CONSTRAINT|COLLECTION|CLASSIFIER|CHANGEFEED|ATTRIBUTES|ASYMMETRIC|WATERMARK|UNMATCHED|UNBOUNDED|TEMPORARY|SYMMETRIC|STREAMING|SAVEPOINT|RETURNING|PRECEDING|PARTITION|INTERSECT|INITIALLY|INCREMENT|IMMEDIATE|FOLLOWING|EXCLUSIVE|EXCLUSION|ENCRYPTED|DIRECTORY|BERNOULLI|TRANSFER|SUBQUERY|SEQUENCE|ROLLBACK|RESTRICT|RESOURCE|PASSWORD|PARALLEL|OPTIONAL|MEASURES|INHERITS|GROUPING|FUNCTION|EXTERNAL|EVALUATE|DISTINCT|DESCRIBE|DEFERRED|DATABASE|CONSUMER|CONFLICT|CALLABLE|WRAPPER|WITHOUT|VIRTUAL|VARIANT|UNKNOWN|TRIGGER|SYMBOLS|SECONDS|RESTORE|RESTART|RESPECT|REPLACE|RELEASE|REINDEX|PROCESS|PRIMARY|PRESORT|PERMUTE|PATTERN|PASSING|NOTNULL|NOLOGIN|NATURAL|MATCHES|INSTEAD|INITIAL|INDEXED|FOREIGN|FLATTEN|EXPLAIN|EXCLUDE|DISCARD|DISABLE|DEFAULT|DECLARE|DECIMAL|CURRENT|CONNECT|COMPACT|COLUMNS|COLLATE|CASCADE|BITCAST|BETWEEN|AUTOMAP|ANALYZE|WINDOW|VALUES|VACUUM|UPSERT|UPDATE|UNIQUE|TAGGED|TABLES|SYSTEM|SUBSET|STRUCT|STREAM|SOURCE|SELECT|SECRET|SCHEMA|SAMPLE|ROLLUP|REVOKE|REVERT|RETURN|RESULT|RENAME|REMOVE|REGEXP|REDUCE|PRAGMA|OTHERS|OPTION|OFFSET|OBJECT|MODIFY|MANAGE|LEGACY|ISNULL|INSERT|IMPORT|IGNORE|HAVING|GROUPS|GLOBAL|FILTER|FAMILY|EXPORT|EXISTS|EXCEPT|ESCAPE|DETACH|DELETE|DEFINE|CREATE|COMMIT|COLUMN|BEFORE|BACKUP|ATTACH|ASSUME|ACTION|WHERE|USING|UNION|TUPLE|TOPIC|TABLE|START|RLIKE|RIGHT|RESET|RANGE|RAISE|QUEUE|QUERY|OWNER|OUTER|ORDER|NULLS|MATCH|LOGIN|LOCAL|LIMIT|INNER|INDEX|ILIKE|GROUP|GRANT|FIRST|FALSE|ERROR|ERASE|EMPTY|CROSS|COVER|CHECK|BEGIN|BATCH|ASYNC|ARRAY|ALTER|AFTER|ABORT|WITH|WHEN|VIEW|USER|TYPE|TRUE|TIES|THEN|TEMP|SYNC|SKIP|SHOW|SETS|SEMI|SEEK|ROWS|POOL|PLAN|PAST|OVER|ONLY|OMIT|NULL|NEXT|LIST|LIKE|LEFT|LAST|JOIN|INTO|HASH|GLOB|FULL|FROM|FLOW|FAIL|ENUM|ELSE|EACH|DROP|DICT|DESC|DATA|CUBE|CAST|CASE|ANSI|XOR|USE|SET|ROW|PER|ONE|NOT|KEY|HOP|FOR|END|ASC|ANY|AND|ALL|ADD|TO|OR|ON|OF|NO|IS|IN|IF|DO|BY|AT|AS)\\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,84 @@
|
|
|
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|pgtable_am_handler|pglanguage_handler|pgindex_am_handler|pgpg_dependencies|_pgtstzmultirange|_pgint8multirange|_pgint4multirange|_pgdatemultirange|pgtstzmultirange|pgpg_ddl_command|pgint8multirange|pgint4multirange|pgdatemultirange|_pgtxid_snapshot|_pgregdictionary|_pgnummultirange|pgtxid_snapshot|pgregdictionary|pgnummultirange|pgevent_trigger|pganymultirange|pganycompatible|_pgtsmultirange|_pgregprocedure|_pgregnamespace|_pgregcollation|_pgpg_attribute|pgtsmultirange|pgregprocedure|pgregnamespace|pgregcollation|pgpg_node_tree|pgpg_ndistinct|pgpg_attribute|_pgtimestamptz|_pgregoperator|_pgpg_snapshot|pgtsm_handler|pgtimestamptz|pgregoperator|pgpg_snapshot|pgpg_mcv_list|pgfdw_handler|pganynonarray|_pgint2vector|TzTimestamp64|pgint2vector|pganyelement|_pgtstzrange|_pgtimestamp|_pgregconfig|_pgrefcursor|_pgoidvector|_pgint8range|_pgint4range|_pggtsvector|_pgdaterange|TzDatetime64|JsonDocument|pgtstzrange|pgtimestamp|pgregconfig|pgrefcursor|pgoidvector|pgint8range|pgint4range|pggtsvector|pgdaterange|_pgtsvector|_pgregclass|_pgpg_class|_pgnumrange|_pgmacaddr8|_pgjsonpath|_pginterval|TzTimestamp|Timestamp64|pgtsvector|pgregclass|pgpg_class|pgnumrange|pgmacaddr8|pgjsonpath|pginterval|pginternal|pganyrange|pganyarray|_pgvarchar|_pgtsrange|_pgtsquery|_pgregtype|_pgregrole|_pgregproc|_pgregoper|_pgpolygon|_pgpg_type|_pgpg_proc|_pgnumeric|_pgmacaddr|_pgcstring|_pgaclitem|TzDatetime|Interval64|Datetime64|pgvarchar|pgunknown|pgtsrange|pgtsquery|pgtrigger|pgregtype|pgregrole|pgregproc|pgregoper|pgpolygon|pgpg_type|pgpg_proc|pgnumeric|pgmacaddr|pgcstring|pganyenum|pgaclitem|_pgvarbit|_pgtimetz|_pgrecord|_pgpg_lsn|_pgfloat8|_pgfloat4|_pgcircle|_pgbpchar|Timestamp|EmptyList|EmptyDict|pgvarbit|pgtimetz|pgrecord|pgpg_lsn|pgfloat8|pgfloat4|pgcircle|pgbpchar|_pgpoint|_pgmoney|_pgjsonb|_pgbytea|TzDate32|Interval|DyNumber|Datetime|pgpoint|pgmoney|pgjsonb|pgbytea|_pgxid8|_pguuid|_pgtime|_pgtext|_pgpath|_pgname|_pglseg|_pgline|_pgjson|_pgint8|_pgint4|_pgint2|_pginet|_pgdate|_pgcidr|_pgchar|_pgbool|Generic|pgxid8|pgvoid|pguuid|pgtime|pgtext|pgpath|pgname|pglseg|pgline|pgjson|pgint8|pgint4|pgint2|pginet|pgdate|pgcidr|pgchar|pgbool|_pgxml|_pgxid|_pgtid|_pgoid|_pgcid|_pgbox|_pgbit|Uint64|Uint32|Uint16|TzDate|String|Double|Date32|pgxml|pgxid|pgtid|pgoid|pgcid|pgbox|pgbit|pgany|Uint8|Int64|Int32|Int16|Float|Yson|Void|Uuid|Utf8|Unit|Json|Int8|Date|Bool)\\b",
|
|
16
|
+
"keyword.type"
|
|
17
|
+
],
|
|
18
|
+
[
|
|
19
|
+
"\\b(CURRENT_TIMESTAMP|MATCH_RECOGNIZE|UNCONDITIONAL|AUTOINCREMENT|MILLISECONDS|MICROSECONDS|EMPTY_ACTION|CURRENT_TIME|CURRENT_DATE|TRANSACTION|TABLESAMPLE|REPLICATION|NANOSECONDS|JSON_EXISTS|INCREMENTAL|CONDITIONAL|TABLESTORE|REPEATABLE|REFERENCES|PRIVILEGES|JSON_VALUE|JSON_QUERY|DEFERRABLE|CONSTRAINT|COLLECTION|CLASSIFIER|CHANGEFEED|ATTRIBUTES|ASYMMETRIC|WATERMARK|UNMATCHED|UNBOUNDED|TEMPORARY|SYMMETRIC|STREAMING|SAVEPOINT|RETURNING|PRECEDING|PARTITION|INTERSECT|INITIALLY|INCREMENT|IMMEDIATE|FOLLOWING|EXCLUSIVE|EXCLUSION|ENCRYPTED|DIRECTORY|BERNOULLI|TRANSFER|SUBQUERY|SEQUENCE|ROLLBACK|RESTRICT|RESOURCE|PASSWORD|PARALLEL|OPTIONAL|MEASURES|INHERITS|GROUPING|FUNCTION|EXTERNAL|EVALUATE|DISTINCT|DESCRIBE|DEFERRED|DATABASE|CONSUMER|CONFLICT|CALLABLE|WRAPPER|WITHOUT|VIRTUAL|VARIANT|UNKNOWN|TRIGGER|SYMBOLS|SECONDS|RESTORE|RESTART|RESPECT|REPLACE|RELEASE|REINDEX|PROCESS|PRIMARY|PRESORT|PERMUTE|PATTERN|PASSING|NOTNULL|NOLOGIN|NATURAL|MATCHES|INSTEAD|INITIAL|INDEXED|FOREIGN|FLATTEN|EXPLAIN|EXCLUDE|DISCARD|DISABLE|DEFAULT|DECLARE|DECIMAL|CURRENT|CONNECT|COMPACT|COLUMNS|COLLATE|CASCADE|BITCAST|BETWEEN|AUTOMAP|ANALYZE|WINDOW|VALUES|VACUUM|UPSERT|UPDATE|UNIQUE|TAGGED|TABLES|SYSTEM|SUBSET|STRUCT|STREAM|SOURCE|SELECT|SECRET|SCHEMA|SAMPLE|ROLLUP|REVOKE|REVERT|RETURN|RESULT|RENAME|REMOVE|REGEXP|REDUCE|PRAGMA|OTHERS|OPTION|OFFSET|OBJECT|MODIFY|MANAGE|LEGACY|ISNULL|INSERT|IMPORT|IGNORE|HAVING|GROUPS|GLOBAL|FILTER|FAMILY|EXPORT|EXISTS|EXCEPT|ESCAPE|DETACH|DELETE|DEFINE|CREATE|COMMIT|COLUMN|BEFORE|BACKUP|ATTACH|ASSUME|ACTION|WHERE|USING|UNION|TUPLE|TOPIC|TABLE|START|RLIKE|RIGHT|RESET|RANGE|RAISE|QUEUE|QUERY|OWNER|OUTER|ORDER|NULLS|MATCH|LOGIN|LOCAL|LIMIT|INNER|INDEX|ILIKE|GROUP|GRANT|FIRST|FALSE|ERROR|ERASE|EMPTY|CROSS|COVER|CHECK|BEGIN|BATCH|ASYNC|ARRAY|ALTER|AFTER|ABORT|WITH|WHEN|VIEW|USER|TYPE|TRUE|TIES|THEN|TEMP|SYNC|SKIP|SHOW|SETS|SEMI|SEEK|ROWS|POOL|PLAN|PAST|OVER|ONLY|OMIT|NULL|NEXT|LIST|LIKE|LEFT|LAST|JOIN|INTO|HASH|GLOB|FULL|FROM|FLOW|FAIL|ENUM|ELSE|EACH|DROP|DICT|DESC|DATA|CUBE|CAST|CASE|ANSI|XOR|USE|SET|ROW|PER|ONE|NOT|KEY|HOP|FOR|END|ASC|ANY|AND|ALL|ADD|TO|OR|ON|OF|NO|IS|IN|IF|DO|BY|AT|AS)\\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]|(\\\u0027\\\u0027))*\\\u0027))|((\\\"([^\"]|(\\\"\\\"))*\\\"))|((\\@\\@(.|\\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", "@comment"],
|
|
46
|
+
["[^\\\/\\*]", "comment"],
|
|
47
|
+
["\\*\\\/", "comment", "@pop"],
|
|
48
|
+
["\\\/\\*", "comment"]
|
|
49
|
+
],
|
|
50
|
+
"stringLiteral": [
|
|
51
|
+
[
|
|
52
|
+
"#py",
|
|
53
|
+
{
|
|
54
|
+
"nextEmbedded": "python",
|
|
55
|
+
"goBack": 3,
|
|
56
|
+
"next": "@embedded",
|
|
57
|
+
"token": "string.python"
|
|
58
|
+
}
|
|
59
|
+
],
|
|
60
|
+
[
|
|
61
|
+
"\\\/\\\/js",
|
|
62
|
+
{
|
|
63
|
+
"nextEmbedded": "javascript",
|
|
64
|
+
"goBack": 4,
|
|
65
|
+
"next": "@embedded",
|
|
66
|
+
"token": "string.js"
|
|
67
|
+
}
|
|
68
|
+
],
|
|
69
|
+
["[^\\@\\@]", "string"],
|
|
70
|
+
["\\@\\@", "string", "@pop"],
|
|
71
|
+
["\\@\\@", "string"]
|
|
72
|
+
],
|
|
73
|
+
"embedded": [
|
|
74
|
+
[
|
|
75
|
+
"([^@]|^)([@]{4})*[@]{2}([@]([^@]|$)|[^@]|$)",
|
|
76
|
+
{
|
|
77
|
+
"nextEmbedded": "@pop",
|
|
78
|
+
"next": "@pop",
|
|
79
|
+
"token": "@rematch"
|
|
80
|
+
}
|
|
81
|
+
]
|
|
82
|
+
]
|
|
83
|
+
}
|
|
84
|
+
}
|
|
@@ -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 './YQLansi.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
|
+
});
|