diff --git a/src/abap/abap.ts b/src/abap/abap.ts index d5bbf5b1..092d9aea 100644 --- a/src/abap/abap.ts +++ b/src/abap/abap.ts @@ -425,7 +425,7 @@ export const language = { 'inner', 'inout', 'input', - 'insert', // also a built-in + 'insert', // also a built-in 'instance', 'instances', 'instr', @@ -1200,10 +1200,7 @@ export const language = { '*sys*' ], - builtinMethods: [ - 'class_constructor', - 'constructor' - ], + builtinMethods: ['class_constructor', 'constructor'], derivedTypes: [ '%CID', @@ -1243,13 +1240,7 @@ export const language = { '$SELF' ], - selectors: [ - '->', - '->*', - '=>', - '~', - '~*' - ], + selectors: ['->', '->*', '=>', '~', '~*'], // // Operators @@ -1339,7 +1330,7 @@ export const language = { tokenizer: { root: [ [ - /[a-z_\/$%@]([\w\/$%]|-(?!>))*/, // exclude '->' selector + /[a-z_\/$%@]([\w\/$%]|-(?!>))*/, // exclude '->' selector { cases: { '@typeKeywords': 'type', diff --git a/src/apex/apex.ts b/src/apex/apex.ts index 1ebed5bb..6b30c8f2 100644 --- a/src/apex/apex.ts +++ b/src/apex/apex.ts @@ -7,7 +7,8 @@ import type { languages } from '../fillers/monaco-editor-core'; export const conf: languages.LanguageConfiguration = { // the default separators except `@$` - wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g, + wordPattern: + /(-?\d*\.\d\w*)|([^\`\~\!\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g, comments: { lineComment: '//', blockComment: ['/*', '*/'] diff --git a/src/bat/bat.ts b/src/bat/bat.ts index 7b316dae..0b7969dd 100644 --- a/src/bat/bat.ts +++ b/src/bat/bat.ts @@ -44,7 +44,8 @@ export const language = { { token: 'delimiter.square', open: '[', close: ']' } ], - keywords: /call|defined|echo|errorlevel|exist|for|goto|if|pause|set|shift|start|title|not|pushd|popd/, + keywords: + /call|defined|echo|errorlevel|exist|for|goto|if|pause|set|shift|start|title|not|pushd|popd/, // we include these common regular expressions symbols: /[=>' }, { open: "'", close: "'" }, - { open: "\"", close: "\""}, - { open: "(*", close: "*)"}, + { open: '"', close: '"' }, + { open: '(*', close: '*)' } ], surroundingPairs: [ { open: '{', close: '}' }, @@ -31,8 +31,8 @@ export const conf: languages.LanguageConfiguration = { { open: '(', close: ')' }, { open: '<', close: '>' }, { open: "'", close: "'" }, - { open: "\"", close: "\""}, - { open: "(*", close: "*)"}, + { open: '"', close: '"' }, + { open: '(*', close: '*)' } ] }; @@ -88,7 +88,7 @@ export const language = { 'to', 'true', 'type', - 'with', + 'with' ], typeKeywords: ['int', 'unit', 'string', 'tz', 'nat', 'bool'], @@ -116,7 +116,7 @@ export const language = { '->', '<-', '&&', - '||', + '||' ], // we include these common regular expressions diff --git a/src/clojure/clojure.ts b/src/clojure/clojure.ts index 33671a66..1eaa55f9 100644 --- a/src/clojure/clojure.ts +++ b/src/clojure/clojure.ts @@ -46,16 +46,19 @@ export const language = { // delimiters: /[\\\[\]\s"#'(),;@^`{}~]|$/, - numbers: /^(?:[+\-]?\d+(?:(?:N|(?:[eE][+\-]?\d+))|(?:\.?\d*(?:M|(?:[eE][+\-]?\d+))?)|\/\d+|[xX][0-9a-fA-F]+|r[0-9a-zA-Z]+)?(?=[\\\[\]\s"#'(),;@^`{}~]|$))/, + numbers: + /^(?:[+\-]?\d+(?:(?:N|(?:[eE][+\-]?\d+))|(?:\.?\d*(?:M|(?:[eE][+\-]?\d+))?)|\/\d+|[xX][0-9a-fA-F]+|r[0-9a-zA-Z]+)?(?=[\\\[\]\s"#'(),;@^`{}~]|$))/, - characters: /^(?:\\(?:backspace|formfeed|newline|return|space|tab|o[0-7]{3}|u[0-9A-Fa-f]{4}|x[0-9A-Fa-f]{4}|.)?(?=[\\\[\]\s"(),;@^`{}~]|$))/, + characters: + /^(?:\\(?:backspace|formfeed|newline|return|space|tab|o[0-7]{3}|u[0-9A-Fa-f]{4}|x[0-9A-Fa-f]{4}|.)?(?=[\\\[\]\s"(),;@^`{}~]|$))/, escapes: /^\\(?:["'\\bfnrt]|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/, // simple-namespace := /^[^\\\/\[\]\d\s"#'(),;@^`{}~][^\\\[\]\s"(),;@^`{}~]*/ // simple-symbol := /^(?:\/|[^\\\/\[\]\d\s"#'(),;@^`{}~][^\\\[\]\s"(),;@^`{}~]*)/ // qualified-symbol := ((<.>)*)? - qualifiedSymbols: /^(?:(?:[^\\\/\[\]\d\s"#'(),;@^`{}~][^\\\[\]\s"(),;@^`{}~]*(?:\.[^\\\/\[\]\d\s"#'(),;@^`{}~][^\\\[\]\s"(),;@^`{}~]*)*\/)?(?:\/|[^\\\/\[\]\d\s"#'(),;@^`{}~][^\\\[\]\s"(),;@^`{}~]*)*(?=[\\\[\]\s"(),;@^`{}~]|$))/, + qualifiedSymbols: + /^(?:(?:[^\\\/\[\]\d\s"#'(),;@^`{}~][^\\\[\]\s"(),;@^`{}~]*(?:\.[^\\\/\[\]\d\s"#'(),;@^`{}~][^\\\[\]\s"(),;@^`{}~]*)*\/)?(?:\/|[^\\\/\[\]\d\s"#'(),;@^`{}~][^\\\[\]\s"(),;@^`{}~]*)*(?=[\\\[\]\s"(),;@^`{}~]|$))/, specialForms: [ '.', diff --git a/src/coffee/coffee.test.ts b/src/coffee/coffee.test.ts index 2f09b03c..4008060c 100644 --- a/src/coffee/coffee.test.ts +++ b/src/coffee/coffee.test.ts @@ -809,8 +809,7 @@ testTokenization('coffeescript', [ // syntax highligting issue with {} - bug 16176 [ { - line: - '"/api/v2/course/#{ $stateParams.courseId }/grading/student/#{$stateParams.studentId}",', + line: '"/api/v2/course/#{ $stateParams.courseId }/grading/student/#{$stateParams.studentId}",', tokens: [ { startIndex: 0, type: 'string.coffee' }, { startIndex: 18, type: '' }, diff --git a/src/coffee/coffee.ts b/src/coffee/coffee.ts index cf6c0843..0994a23f 100644 --- a/src/coffee/coffee.ts +++ b/src/coffee/coffee.ts @@ -6,7 +6,8 @@ import type { languages } from '../fillers/monaco-editor-core'; export const conf: languages.LanguageConfiguration = { - wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\@\#%\^\&\*\(\)\=\$\-\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g, + wordPattern: + /(-?\d*\.\d\w*)|([^\`\~\!\@\#%\^\&\*\(\)\=\$\-\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g, comments: { blockComment: ['###', '###'], lineComment: '#' diff --git a/src/csharp/csharp.ts b/src/csharp/csharp.ts index 2d7a4ff2..3b2e3e73 100644 --- a/src/csharp/csharp.ts +++ b/src/csharp/csharp.ts @@ -6,7 +6,8 @@ import type { languages } from '../fillers/monaco-editor-core'; export const conf: languages.LanguageConfiguration = { - wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\#\$\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g, + wordPattern: + /(-?\d*\.\d\w*)|([^\`\~\!\#\$\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g, comments: { lineComment: '//', blockComment: ['/*', '*/'] diff --git a/src/css/css.test.ts b/src/css/css.test.ts index 5c09a143..1c072f71 100644 --- a/src/css/css.test.ts +++ b/src/css/css.test.ts @@ -484,8 +484,7 @@ testTokenization('css', [ // .a{background:#f5f9fc !important}.b{font-family:"Helvetica Neue", Helvetica;height:31px;} [ { - line: - '.a{background:#f5f9fc !important}.b{font-family:"Helvetica Neue", Helvetica;height:31px;}', + line: '.a{background:#f5f9fc !important}.b{font-family:"Helvetica Neue", Helvetica;height:31px;}', tokens: [ { startIndex: 0, type: 'tag.css' }, { startIndex: 2, type: 'delimiter.bracket.css' }, @@ -515,8 +514,7 @@ testTokenization('css', [ //.even { background: #fff url(data:image/gif;base64,R0lGODlhBgASALMAAOfn5+rq6uvr6+zs7O7u7vHx8fPz8/b29vj4+P39/f///wAAAAAAAAAAAAAAAAAAACwAAAAABgASAAAIMAAVCBxIsKDBgwgTDkzAsKGAhxARSJx4oKJFAxgzFtjIkYDHjwNCigxAsiSAkygDAgA7) repeat-x bottom} [ { - line: - '.even { background: #fff url(data:image/gif;base64,R0lGODlhBgASALMAAOfn5+rq6uvr6+zs7O7u7vHx8fPz8/b29vj4+P39/f///wAAAAAAAAAAAAAAAAAAACwAAAAABgASAAAIMAAVCBxIsKDBgwgTDkzAsKGAhxARSJx4oKJFAxgzFtjIkYDHjwNCigxAsiSAkygDAgA7) repeat-x bottom}', + line: '.even { background: #fff url(data:image/gif;base64,R0lGODlhBgASALMAAOfn5+rq6uvr6+zs7O7u7vHx8fPz8/b29vj4+P39/f///wAAAAAAAAAAAAAAAAAAACwAAAAABgASAAAIMAAVCBxIsKDBgwgTDkzAsKGAhxARSJx4oKJFAxgzFtjIkYDHjwNCigxAsiSAkygDAgA7) repeat-x bottom}', tokens: [ { startIndex: 0, type: 'tag.css' }, { startIndex: 5, type: '' }, diff --git a/src/dockerfile/dockerfile.test.ts b/src/dockerfile/dockerfile.test.ts index 847d17f5..fb7c8251 100644 --- a/src/dockerfile/dockerfile.test.ts +++ b/src/dockerfile/dockerfile.test.ts @@ -53,8 +53,7 @@ testTokenization('dockerfile', [ tokens: [] }, { - line: - 'ONBUILD RUN curl -sSL https://raw.githubusercontent.com/aspnet/Home/dev/kvminstall.sh | sh', + line: 'ONBUILD RUN curl -sSL https://raw.githubusercontent.com/aspnet/Home/dev/kvminstall.sh | sh', tokens: [ { startIndex: 0, type: 'keyword.dockerfile' }, { startIndex: 7, type: '' }, @@ -79,8 +78,7 @@ testTokenization('dockerfile', [ tokens: [{ startIndex: 0, type: 'string.dockerfile' }] }, { - line: - ' && kvm alias default | xargs -i ln -s $KRE_USER_HOME/packages/{} $KRE_USER_HOME/packages/default"', + line: ' && kvm alias default | xargs -i ln -s $KRE_USER_HOME/packages/{} $KRE_USER_HOME/packages/default"', tokens: [ { startIndex: 0, type: 'string.dockerfile' }, { startIndex: 42, type: 'variable.dockerfile' }, @@ -94,8 +92,7 @@ testTokenization('dockerfile', [ tokens: [] }, { - line: - '# Install libuv for Kestrel from source code (binary is not in wheezy and one in jessie is still too old)', + line: '# Install libuv for Kestrel from source code (binary is not in wheezy and one in jessie is still too old)', tokens: [{ startIndex: 0, type: 'comment.dockerfile' }] }, { @@ -129,8 +126,7 @@ testTokenization('dockerfile', [ ] }, { - line: - ' && curl -sSL https://github.com/joyent/libuv/archive/v${LIBUV_VERSION}.tar.gz | tar zxfv - -C /usr/local/src \\', + line: ' && curl -sSL https://github.com/joyent/libuv/archive/v${LIBUV_VERSION}.tar.gz | tar zxfv - -C /usr/local/src \\', tokens: [ { startIndex: 0, type: '' }, { startIndex: 58, type: 'variable.dockerfile' }, diff --git a/src/elixir/elixir.ts b/src/elixir/elixir.ts index 1316cfc2..f73b350a 100644 --- a/src/elixir/elixir.ts +++ b/src/elixir/elixir.ts @@ -108,7 +108,8 @@ export const language = { // Matches any of the operator names: // <<< >>> ||| &&& ^^^ ~~~ === !== ~>> <~> |~> <|> == != <= >= && || \\ <> ++ -- |> =~ -> <- ~> <~ :: .. = < > + - * / | . ^ & ! - operator: /-[->]?|!={0,2}|\*|\/|\\\\|&{1,3}|\.\.?|\^(?:\^\^)?|\+\+?|<(?:-|<<|=|>|\|>|~>?)?|=~|={1,3}|>(?:=|>>)?|\|~>|\|>|\|{1,3}|~>>?|~~~|::/, + operator: + /-[->]?|!={0,2}|\*|\/|\\\\|&{1,3}|\.\.?|\^(?:\^\^)?|\+\+?|<(?:-|<<|=|>|\|>|~>?)?|=~|={1,3}|>(?:=|>>)?|\|~>|\|>|\|{1,3}|~>>?|~~~|::/, // See https://hexdocs.pm/elixir/syntax-reference.html#variables variableName: /[a-z_][a-zA-Z0-9_]*[?!]?/, diff --git a/src/hcl/hcl.ts b/src/hcl/hcl.ts index 989ccde0..06e535e9 100644 --- a/src/hcl/hcl.ts +++ b/src/hcl/hcl.ts @@ -76,7 +76,8 @@ export const language = { symbols: /[=>\/\?\s]+)/g, + wordPattern: + /(-?\d*\.\d\w*)|([^\`\~\!\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g, comments: { lineComment: '//', blockComment: ['/*', '*/'] diff --git a/src/kotlin/kotlin.ts b/src/kotlin/kotlin.ts index ca3568cb..8fa6102e 100644 --- a/src/kotlin/kotlin.ts +++ b/src/kotlin/kotlin.ts @@ -7,7 +7,8 @@ import type { languages } from '../fillers/monaco-editor-core'; export const conf: languages.LanguageConfiguration = { // the default separators except `@$` - wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g, + wordPattern: + /(-?\d*\.\d\w*)|([^\`\~\!\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g, comments: { lineComment: '//', blockComment: ['/*', '*/'] diff --git a/src/less/less.test.ts b/src/less/less.test.ts index 7c160782..89ffbf76 100644 --- a/src/less/less.test.ts +++ b/src/less/less.test.ts @@ -1001,8 +1001,7 @@ testTokenization( [ { - line: - '.bw-gradient(@color: #F5F5F5, @start: 0, @stop: 255) { background: -webkit-gradient(color-stop(0, rgb(@start,@start,@start)), color-stop(1, rgb(@stop,@stop,@stop))); }', + line: '.bw-gradient(@color: #F5F5F5, @start: 0, @stop: 255) { background: -webkit-gradient(color-stop(0, rgb(@start,@start,@start)), color-stop(1, rgb(@stop,@stop,@stop))); }', tokens: [ { startIndex: 0, type: 'tag.class.less' }, { startIndex: 12, type: 'delimiter.parenthesis.less' }, diff --git a/src/liquid/liquid.test.ts b/src/liquid/liquid.test.ts index 9b6cfedb..b067fd09 100644 --- a/src/liquid/liquid.test.ts +++ b/src/liquid/liquid.test.ts @@ -118,8 +118,7 @@ testTokenization( // If tag / keywords / block style tags [ { - line: - '
{% if true=false %}
True
{% else %}
False
{% endif %}
', + line: '
{% if true=false %}
True
{% else %}
False
{% endif %}
', tokens: [ { startIndex: 0, type: 'delimiter.html' }, { startIndex: 1, type: 'tag.html' }, @@ -187,8 +186,7 @@ testTokenization( // Raw tag [ { - line: - '
Everything here should be escaped {% raw %} In Handlebars, {{ this }} will be HTML-escaped, but {{{ that }}} will not. {% endraw %}
', + line: '
Everything here should be escaped {% raw %} In Handlebars, {{ this }} will be HTML-escaped, but {{{ that }}} will not. {% endraw %}
', tokens: [ { startIndex: 0, type: 'delimiter.html' }, { startIndex: 1, type: 'tag.html' }, diff --git a/src/liquid/liquid.ts b/src/liquid/liquid.ts index 06a3b3f2..65384185 100644 --- a/src/liquid/liquid.ts +++ b/src/liquid/liquid.ts @@ -216,7 +216,7 @@ export const language = { [/^(?!\{\%\s*endraw\s*\%\}).+/], [/\{\%/, 'delimiter.tag.liquid'], [/@identifier/], - [/\%\}/, { token: 'delimiter.tag.liquid', next: '@root' }], + [/\%\}/, { token: 'delimiter.tag.liquid', next: '@root' }] ], liquidRoot: [ diff --git a/src/mips/mips.ts b/src/mips/mips.ts index 987c9aef..d66e4bec 100644 --- a/src/mips/mips.ts +++ b/src/mips/mips.ts @@ -6,7 +6,8 @@ import type { languages } from '../fillers/monaco-editor-core'; export const conf: languages.LanguageConfiguration = { - wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\@\#%\^\&\*\(\)\=\$\-\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g, + wordPattern: + /(-?\d*\.\d\w*)|([^\`\~\!\@\#%\^\&\*\(\)\=\$\-\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g, comments: { blockComment: ['###', '###'], lineComment: '#' diff --git a/src/objective-c/objective-c.test.ts b/src/objective-c/objective-c.test.ts index 4e2fbfbf..0c5afd3f 100644 --- a/src/objective-c/objective-c.test.ts +++ b/src/objective-c/objective-c.test.ts @@ -9,8 +9,7 @@ testTokenization('objective-c', [ // Keywords [ { - line: - '-(id) initWithParams:(id) aHandler withDeviceStateManager:(id) deviceStateManager', + line: '-(id) initWithParams:(id) aHandler withDeviceStateManager:(id) deviceStateManager', tokens: [ { startIndex: 0, type: '' }, { startIndex: 1, type: 'delimiter.parenthesis.objective-c' }, diff --git a/src/pascal/pascal.ts b/src/pascal/pascal.ts index ef0eb5b6..c330191d 100644 --- a/src/pascal/pascal.ts +++ b/src/pascal/pascal.ts @@ -7,7 +7,8 @@ import type { languages } from '../fillers/monaco-editor-core'; export const conf: languages.LanguageConfiguration = { // the default separators except `@$` - wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g, + wordPattern: + /(-?\d*\.\d\w*)|([^\`\~\!\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g, comments: { lineComment: '//', blockComment: ['{', '}'] diff --git a/src/php/php.test.ts b/src/php/php.test.ts index 7368ced1..8467ac3d 100644 --- a/src/php/php.test.ts +++ b/src/php/php.test.ts @@ -2258,8 +2258,7 @@ testTokenization( // HTML (CSS (PHP)), HTML ( PHP, JS (PHP), PHP) [ { - line: - '*/?> */var y = 4;', + line: '*/?> */var y = 4;', tokens: [ { startIndex: 0, type: 'delimiter.html' }, { startIndex: 1, type: 'tag.html' }, diff --git a/src/php/php.ts b/src/php/php.ts index 6c3ebb95..e02c09e6 100644 --- a/src/php/php.ts +++ b/src/php/php.ts @@ -6,7 +6,8 @@ import type { languages } from '../fillers/monaco-editor-core'; export const conf: languages.LanguageConfiguration = { - wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\@\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g, + wordPattern: + /(-?\d*\.\d\w*)|([^\`\~\!\@\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g, comments: { lineComment: '//', diff --git a/src/postiats/postiats.ts b/src/postiats/postiats.ts index 2d03d76e..89d8dc66 100644 --- a/src/postiats/postiats.ts +++ b/src/postiats/postiats.ts @@ -459,7 +459,8 @@ export const language = { fexponent_bin: /[pP][+-]?[0-9]+/, deciexp: /\.[0-9]*@fexponent?/, hexiexp: /\.[0-9a-zA-Z]*@fexponent_bin?/, - irregular_keywords: /val[+-]?|case[+-]?|addr\@?|fold\@|free\@|fix\@?|lam\@?|llam\@?|prop[+-]?|type[+-]?|view[+-@]?|viewt@?ype[+-]?|t@?ype[+-]?|v(iew)?t@?ype[+-]?|abst@?ype|absv(iew)?t@?ype|for\*?|while\*?/, + irregular_keywords: + /val[+-]?|case[+-]?|addr\@?|fold\@|free\@|fix\@?|lam\@?|llam\@?|prop[+-]?|type[+-]?|view[+-@]?|viewt@?ype[+-]?|t@?ype[+-]?|v(iew)?t@?ype[+-]?|abst@?ype|absv(iew)?t@?ype|for\*?|while\*?/, ESCHAR: /[ntvbrfa\\\?'"\(\[\{]/, start: 'root', diff --git a/src/powershell/powershell.test.ts b/src/powershell/powershell.test.ts index b4ae00fc..82762398 100644 --- a/src/powershell/powershell.test.ts +++ b/src/powershell/powershell.test.ts @@ -480,8 +480,7 @@ testTokenization('powershell', [ ] }, { - line: - '#the object info array contains hashmaps, each of which represent a parameter set and describe a target in the XenCenter resource list', + line: '#the object info array contains hashmaps, each of which represent a parameter set and describe a target in the XenCenter resource list', tokens: [{ startIndex: 0, type: 'comment.ps1' }] }, { @@ -527,8 +526,7 @@ testTokenization('powershell', [ ] }, { - line: - ' #When the XenCenter node is selected a parameter set is created for each of your connected servers with the class and objUuid keys marked as blank', + line: ' #When the XenCenter node is selected a parameter set is created for each of your connected servers with the class and objUuid keys marked as blank', tokens: [ { startIndex: 0, type: '' }, { startIndex: 2, type: 'comment.ps1' } @@ -622,8 +620,7 @@ testTokenization('powershell', [ ] }, { - line: - ' #When a disconnected server is selected there is no session information, we get null for everything except class', + line: ' #When a disconnected server is selected there is no session information, we get null for everything except class', tokens: [ { startIndex: 0, type: '' }, { startIndex: 2, type: 'comment.ps1' } @@ -662,8 +659,7 @@ testTokenization('powershell', [ ] }, { - line: - ' Connect-XenServer -url $parameterSet["url"] -opaqueref $parameterSet["sessionRef"]', + line: ' Connect-XenServer -url $parameterSet["url"] -opaqueref $parameterSet["sessionRef"]', tokens: [ { startIndex: 0, type: '' }, { startIndex: 20, type: 'delimiter.ps1' }, @@ -689,16 +685,14 @@ testTokenization('powershell', [ ] }, { - line: - ' #-properties allows us to filter the results to just include the selected object', + line: ' #-properties allows us to filter the results to just include the selected object', tokens: [ { startIndex: 0, type: '' }, { startIndex: 2, type: 'comment.ps1' } ] }, { - line: - ' $exp = "Get-XenServer:{0} -properties @{{uuid=\'{1}\'}}" -f $parameterSet["class"], $parameterSet["objUuid"]', + line: ' $exp = "Get-XenServer:{0} -properties @{{uuid=\'{1}\'}}" -f $parameterSet["class"], $parameterSet["objUuid"]', tokens: [ { startIndex: 0, type: '' }, { startIndex: 2, type: 'variable.ps1' }, diff --git a/src/powershell/powershell.ts b/src/powershell/powershell.ts index 17cc7f5e..ddb8363b 100644 --- a/src/powershell/powershell.ts +++ b/src/powershell/powershell.ts @@ -7,7 +7,8 @@ import type { languages } from '../fillers/monaco-editor-core'; export const conf: languages.LanguageConfiguration = { // the default separators except `$-` - wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\@\#%\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g, + wordPattern: + /(-?\d*\.\d\w*)|([^\`\~\!\@\#%\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g, comments: { lineComment: '#', blockComment: ['<#', '#>'] @@ -90,7 +91,8 @@ export const language = { 'configuration' ], - helpKeywords: /SYNOPSIS|DESCRIPTION|PARAMETER|EXAMPLE|INPUTS|OUTPUTS|NOTES|LINK|COMPONENT|ROLE|FUNCTIONALITY|FORWARDHELPTARGETNAME|FORWARDHELPCATEGORY|REMOTEHELPRUNSPACE|EXTERNALHELP/, + helpKeywords: + /SYNOPSIS|DESCRIPTION|PARAMETER|EXAMPLE|INPUTS|OUTPUTS|NOTES|LINK|COMPONENT|ROLE|FUNCTIONALITY|FORWARDHELPTARGETNAME|FORWARDHELPCATEGORY|REMOTEHELPRUNSPACE|EXTERNALHELP/, // we include these common regular expressions symbols: /[=>{ tokenPostfix: '.r', roxygen: [ - '@alias', - '@aliases', - '@assignee', - '@author', - '@backref', - '@callGraph', - '@callGraphDepth', - '@callGraphPrimitives', - '@concept', - '@describeIn', - '@description', - '@details', - '@docType', - '@encoding', - '@evalNamespace', - '@evalRd', - '@example', - '@examples', - '@export', - '@exportClass', - '@exportMethod', - '@exportPattern', - '@family', - '@field', - '@formals', - '@format', - '@import', - '@importClassesFrom', - '@importFrom', - '@importMethodsFrom', - '@include', - '@inherit', - '@inheritDotParams', - '@inheritParams', - '@inheritSection', - '@keywords', - '@md', - '@method', - '@name', - '@noMd', - '@noRd', - '@note', - '@param', - '@rawNamespace', - '@rawRd', - '@rdname', - '@references', - '@return', - '@S3method', - '@section', - '@seealso', - '@setClass', - '@slot', - '@source', - '@template', - '@templateVar', - '@title', - '@TODO', - '@usage', - '@useDynLib' + '@alias', + '@aliases', + '@assignee', + '@author', + '@backref', + '@callGraph', + '@callGraphDepth', + '@callGraphPrimitives', + '@concept', + '@describeIn', + '@description', + '@details', + '@docType', + '@encoding', + '@evalNamespace', + '@evalRd', + '@example', + '@examples', + '@export', + '@exportClass', + '@exportMethod', + '@exportPattern', + '@family', + '@field', + '@formals', + '@format', + '@import', + '@importClassesFrom', + '@importFrom', + '@importMethodsFrom', + '@include', + '@inherit', + '@inheritDotParams', + '@inheritParams', + '@inheritSection', + '@keywords', + '@md', + '@method', + '@name', + '@noMd', + '@noRd', + '@note', + '@param', + '@rawNamespace', + '@rawRd', + '@rdname', + '@references', + '@return', + '@S3method', + '@section', + '@seealso', + '@setClass', + '@slot', + '@source', + '@template', + '@templateVar', + '@title', + '@TODO', + '@usage', + '@useDynLib' ], constants: [ diff --git a/src/rust/rust.test.ts b/src/rust/rust.test.ts index 610e4975..53598975 100644 --- a/src/rust/rust.test.ts +++ b/src/rust/rust.test.ts @@ -50,7 +50,7 @@ testTokenization('rust', [ tokens: [{ startIndex: 0, type: 'string.byteliteral.rust' }] } ], - + // Comment [ { diff --git a/src/scala/scala.ts b/src/scala/scala.ts index 35550562..9cbefe4e 100644 --- a/src/scala/scala.ts +++ b/src/scala/scala.ts @@ -12,7 +12,8 @@ export const conf: languages.LanguageConfiguration = { * unary_ is allowed as an identifier. * _= is allowed as an identifier. */ - wordPattern: /(unary_[@~!#%^&*()\-=+\\|:<>\/?]+)|([a-zA-Z_$][\w$]*?_=)|(`[^`]+`)|([a-zA-Z_$][\w$]*)/g, + wordPattern: + /(unary_[@~!#%^&*()\-=+\\|:<>\/?]+)|([a-zA-Z_$][\w$]*?_=)|(`[^`]+`)|([a-zA-Z_$][\w$]*)/g, comments: { lineComment: '//', blockComment: ['/*', '*/'] diff --git a/src/swift/swift.ts b/src/swift/swift.ts index c05a2798..9dcb5e5e 100644 --- a/src/swift/swift.ts +++ b/src/swift/swift.ts @@ -143,8 +143,10 @@ export const language = { symbols: /[=(){}\[\].,:;@#\_&\-<>`?!+*\\\/]/, // Moved . to operatorstart so it can be a delimiter - operatorstart: /[\/=\-+!*%<>&|^~?\u00A1-\u00A7\u00A9\u00AB\u00AC\u00AE\u00B0-\u00B1\u00B6\u00BB\u00BF\u00D7\u00F7\u2016-\u2017\u2020-\u2027\u2030-\u203E\u2041-\u2053\u2055-\u205E\u2190-\u23FF\u2500-\u2775\u2794-\u2BFF\u2E00-\u2E7F\u3001-\u3003\u3008-\u3030]/, - operatorend: /[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE00-\uFE0F\uFE20-\uFE2F\uE0100-\uE01EF]/, + operatorstart: + /[\/=\-+!*%<>&|^~?\u00A1-\u00A7\u00A9\u00AB\u00AC\u00AE\u00B0-\u00B1\u00B6\u00BB\u00BF\u00D7\u00F7\u2016-\u2017\u2020-\u2027\u2030-\u203E\u2041-\u2053\u2055-\u205E\u2190-\u23FF\u2500-\u2775\u2794-\u2BFF\u2E00-\u2E7F\u3001-\u3003\u3008-\u3030]/, + operatorend: + /[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE00-\uFE0F\uFE20-\uFE2F\uE0100-\uE01EF]/, operators: /(@operatorstart)((@operatorstart)|(@operatorend))*/, // TODO(owensd): These are borrowed from C#; need to validate correctness for Swift. diff --git a/src/systemverilog/systemverilog.test.ts b/src/systemverilog/systemverilog.test.ts index 91bfd79b..56176067 100644 --- a/src/systemverilog/systemverilog.test.ts +++ b/src/systemverilog/systemverilog.test.ts @@ -335,8 +335,7 @@ testTokenization('systemverilog', [ ], [ { - line: - 'typedef enum int {FAST_SIM = 0, RANDOM = 1, NOMINAL = 2, START_UP = 3} clock_plan_e;', + line: 'typedef enum int {FAST_SIM = 0, RANDOM = 1, NOMINAL = 2, START_UP = 3} clock_plan_e;', tokens: [ { startIndex: 0, type: 'keyword.typedef.sv' }, { startIndex: 7, type: '' }, diff --git a/src/typescript/typescript.ts b/src/typescript/typescript.ts index 91c1dcaa..582b492b 100644 --- a/src/typescript/typescript.ts +++ b/src/typescript/typescript.ts @@ -6,7 +6,8 @@ import { languages } from '../fillers/monaco-editor-core'; export const conf: languages.LanguageConfiguration = { - wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\@\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g, + wordPattern: + /(-?\d*\.\d\w*)|([^\`\~\!\@\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g, comments: { lineComment: '//', diff --git a/src/yaml/yaml.test.ts b/src/yaml/yaml.test.ts index c2e5484e..6a0aa846 100644 --- a/src/yaml/yaml.test.ts +++ b/src/yaml/yaml.test.ts @@ -452,8 +452,7 @@ testTokenization('yaml', [ ], [ { - line: - "text: Pretty vector drawing. #this is comment doesn't have proper syntax higlighting", + line: "text: Pretty vector drawing. #this is comment doesn't have proper syntax higlighting", tokens: [ { startIndex: 0, type: 'type.yaml' }, { startIndex: 4, type: 'operators.yaml' },