Merge branch 'main' into extend-st-extensions-twincat

This commit is contained in:
Henning Dieterichs 2023-02-06 11:41:35 +01:00 committed by GitHub
commit 31b21cfea6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
70 changed files with 8932 additions and 782 deletions

View file

@ -272,7 +272,7 @@ export const language = <languages.IMonarchLanguage>{
// we include these common regular expressions
symbols: /[=><!~?:&|+\-*\/\^%]+/,
escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
escapes: /\\(?:[0abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
integersuffix: /([uU](ll|LL|l|L)|(ll|LL|l|L)?[uU]?)/,
floatsuffix: /[fFlL]?/,
encoding: /u|u8|U|L/,

View file

@ -383,5 +383,32 @@ testTokenization('elixir', [
{ startIndex: 15, type: 'delimiter.square.elixir' }
]
}
],
// Bitstrings
[
{
line: '<<height::32-integer, width::32-integer, data::binary>>',
tokens: [
{ startIndex: 0, type: 'delimiter.angle.special.elixir' },
{ startIndex: 2, type: 'identifier.elixir' },
{ startIndex: 8, type: 'operator.elixir' },
{ startIndex: 10, type: 'number.elixir' },
{ startIndex: 12, type: 'operator.elixir' },
{ startIndex: 13, type: 'identifier.elixir' },
{ startIndex: 20, type: 'punctuation.elixir' },
{ startIndex: 21, type: 'white.elixir' },
{ startIndex: 22, type: 'identifier.elixir' },
{ startIndex: 27, type: 'operator.elixir' },
{ startIndex: 29, type: 'number.elixir' },
{ startIndex: 31, type: 'operator.elixir' },
{ startIndex: 32, type: 'identifier.elixir' },
{ startIndex: 39, type: 'punctuation.elixir' },
{ startIndex: 40, type: 'white.elixir' },
{ startIndex: 41, type: 'identifier.elixir' },
{ startIndex: 45, type: 'operator.elixir' },
{ startIndex: 47, type: 'identifier.elixir' },
{ startIndex: 53, type: 'delimiter.angle.special.elixir' }
]
}
]
]);

View file

@ -167,7 +167,7 @@ export const language = <languages.IMonarchLanguage>{
// Keyword list shorthand
keywordsShorthand: [
[/(@atomName)(:)/, ['constant', 'constant.punctuation']],
[/(@atomName)(:)(\s+)/, ['constant', 'constant.punctuation', 'white']],
// Use positive look-ahead to ensure the string is followed by :
// and should be considered a keyword.
[
@ -532,6 +532,13 @@ export const language = <languages.IMonarchLanguage>{
next: '@doubleQuotedHeredocDocstring'
}
],
[
/\@(module|type)?doc (~[sS])?'''/,
{
token: 'comment.block.documentation',
next: '@singleQuotedHeredocDocstring'
}
],
[
/\@(module|type)?doc (~[sS])?"/,
{
@ -539,6 +546,13 @@ export const language = <languages.IMonarchLanguage>{
next: '@doubleQuotedStringDocstring'
}
],
[
/\@(module|type)?doc (~[sS])?'/,
{
token: 'comment.block.documentation',
next: '@singleQuotedStringDocstring'
}
],
[/\@(module|type)?doc false/, 'comment.block.documentation'],
// Module attributes
[/\@(@variableName)/, 'variable']
@ -549,11 +563,21 @@ export const language = <languages.IMonarchLanguage>{
{ include: '@docstringContent' }
],
singleQuotedHeredocDocstring: [
[/'''/, { token: 'comment.block.documentation', next: '@pop' }],
{ include: '@docstringContent' }
],
doubleQuotedStringDocstring: [
[/"/, { token: 'comment.block.documentation', next: '@pop' }],
{ include: '@docstringContent' }
],
singleQuotedStringDocstring: [
[/'/, { token: 'comment.block.documentation', next: '@pop' }],
{ include: '@docstringContent' }
],
// Operators, punctuation, brackets
symbols: [

View file

@ -10,7 +10,7 @@ declare var require: any;
registerLanguage({
id: 'kotlin',
extensions: ['.kt'],
extensions: ['.kt', '.kts'],
aliases: ['Kotlin', 'kotlin'],
mimetypes: ['text/x-kotlin-source', 'text/x-kotlin'],
loader: () => {

View file

@ -862,6 +862,7 @@ export const language = <languages.IMonarchLanguage>{
[/"/, { token: 'string.double', next: '@stringDouble' }]
],
string: [
[/\\'/, 'string'],
[/[^']+/, 'string'],
[/''/, 'string'],
[/'/, { token: 'string', next: '@pop' }]

View file

@ -627,11 +627,15 @@ export const language = <languages.IMonarchLanguage>{
'range_intersect_agg',
'range_merge',
'rank',
'regexp_count',
'regexp_instr',
'regexp_like',
'regexp_match',
'regexp_matches',
'regexp_replace',
'regexp_split_to_array',
'regexp_split_to_table',
'regexp_substr',
'regr_avgx',
'regr_avgy',
'regr_count',

View file

@ -137,6 +137,7 @@ export const language = {
'require',
'global',
'return',
'satisfies',
'set',
'static',
'string',

View file

@ -16,6 +16,8 @@ registerLanguage({
'.ascx',
'.csproj',
'.config',
'.props',
'.targets',
'.wxi',
'.wxl',
'.wxs',