run prettier

This commit is contained in:
Alex Dima 2021-10-08 18:39:08 +02:00
parent 5f40d268df
commit 25cb9d78a8
No known key found for this signature in database
GPG key ID: 39563C1504FDD0C9
35 changed files with 144 additions and 161 deletions

View file

@ -1200,10 +1200,7 @@ export const language = <languages.IMonarchLanguage>{
'*sys*' '*sys*'
], ],
builtinMethods: [ builtinMethods: ['class_constructor', 'constructor'],
'class_constructor',
'constructor'
],
derivedTypes: [ derivedTypes: [
'%CID', '%CID',
@ -1243,13 +1240,7 @@ export const language = <languages.IMonarchLanguage>{
'$SELF' '$SELF'
], ],
selectors: [ selectors: ['->', '->*', '=>', '~', '~*'],
'->',
'->*',
'=>',
'~',
'~*'
],
// //
// Operators // Operators

View file

@ -7,7 +7,8 @@ import type { languages } from '../fillers/monaco-editor-core';
export const conf: languages.LanguageConfiguration = { export const conf: languages.LanguageConfiguration = {
// the default separators except `@$` // the default separators except `@$`
wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g, wordPattern:
/(-?\d*\.\d\w*)|([^\`\~\!\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,
comments: { comments: {
lineComment: '//', lineComment: '//',
blockComment: ['/*', '*/'] blockComment: ['/*', '*/']

View file

@ -44,7 +44,8 @@ export const language = <languages.IMonarchLanguage>{
{ token: 'delimiter.square', open: '[', close: ']' } { 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 // we include these common regular expressions
symbols: /[=><!~?&|+\-*\/\^;\.,]+/, symbols: /[=><!~?&|+\-*\/\^;\.,]+/,

View file

@ -66,8 +66,7 @@ testTokenization('bicep', [
] ]
}, },
{ {
line: line: " domainConfigurationType/*comment*/:/*comment*/'as//notacomment!d/* also not a comment */fsdf'// test!/*",
" domainConfigurationType/*comment*/:/*comment*/'as//notacomment!d/* also not a comment */fsdf'// test!/*",
tokens: [ tokens: [
{ startIndex: 0, type: '' }, { startIndex: 0, type: '' },
{ startIndex: 4, type: 'identifier.bicep' }, { startIndex: 4, type: 'identifier.bicep' },
@ -374,8 +373,7 @@ testTokenization('bicep', [
tokens: [{ startIndex: 0, type: '' }] tokens: [{ startIndex: 0, type: '' }]
}, },
{ {
line: line: "resource secrets1 'Microsoft.KeyVault/vaults/secrets@2018-02-14' = if (secrets0.id == '') {",
"resource secrets1 'Microsoft.KeyVault/vaults/secrets@2018-02-14' = if (secrets0.id == '') {",
tokens: [ tokens: [
{ startIndex: 0, type: 'keyword.bicep' }, { startIndex: 0, type: 'keyword.bicep' },
{ startIndex: 8, type: '' }, { startIndex: 8, type: '' },
@ -429,8 +427,7 @@ testTokenization('bicep', [
tokens: [] tokens: []
}, },
{ {
line: line: "resource secrets2 'Microsoft.KeyVault/vaults/secrets@2018-02-14' = [for secret in secretsObject.secrets: {",
"resource secrets2 'Microsoft.KeyVault/vaults/secrets@2018-02-14' = [for secret in secretsObject.secrets: {",
tokens: [ tokens: [
{ startIndex: 0, type: 'keyword.bicep' }, { startIndex: 0, type: 'keyword.bicep' },
{ startIndex: 8, type: '' }, { startIndex: 8, type: '' },
@ -478,8 +475,7 @@ testTokenization('bicep', [
tokens: [] tokens: []
}, },
{ {
line: line: "resource secrets3 'Microsoft.KeyVault/vaults/secrets@2018-02-14' = [for secret in secretsObject.secrets: {",
"resource secrets3 'Microsoft.KeyVault/vaults/secrets@2018-02-14' = [for secret in secretsObject.secrets: {",
tokens: [ tokens: [
{ startIndex: 0, type: 'keyword.bicep' }, { startIndex: 0, type: 'keyword.bicep' },
{ startIndex: 8, type: '' }, { startIndex: 8, type: '' },
@ -551,8 +547,7 @@ testTokenization('bicep', [
tokens: [] tokens: []
}, },
{ {
line: line: "resource secrets4 'Microsoft.KeyVault/vaults/secrets@2018-02-14' = [for secret in secretsObject.secrets: if (true) {",
"resource secrets4 'Microsoft.KeyVault/vaults/secrets@2018-02-14' = [for secret in secretsObject.secrets: if (true) {",
tokens: [ tokens: [
{ startIndex: 0, type: 'keyword.bicep' }, { startIndex: 0, type: 'keyword.bicep' },
{ startIndex: 8, type: '' }, { startIndex: 8, type: '' },
@ -609,8 +604,7 @@ testTokenization('bicep', [
tokens: [] tokens: []
}, },
{ {
line: line: "resource virtualNetwork 'Microsoft.Network/virtualNetworks@2020-08-01' existing = {",
"resource virtualNetwork 'Microsoft.Network/virtualNetworks@2020-08-01' existing = {",
tokens: [ tokens: [
{ startIndex: 0, type: 'keyword.bicep' }, { startIndex: 0, type: 'keyword.bicep' },
{ startIndex: 8, type: '' }, { startIndex: 8, type: '' },

View file

@ -22,8 +22,8 @@ export const conf: languages.LanguageConfiguration = {
{ open: '(', close: ')' }, { open: '(', close: ')' },
{ open: '<', close: '>' }, { open: '<', close: '>' },
{ open: "'", close: "'" }, { open: "'", close: "'" },
{ open: "\"", close: "\""}, { open: '"', close: '"' },
{ open: "(*", close: "*)"}, { open: '(*', close: '*)' }
], ],
surroundingPairs: [ surroundingPairs: [
{ open: '{', close: '}' }, { 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: "\""}, { open: '"', close: '"' },
{ open: "(*", close: "*)"}, { open: '(*', close: '*)' }
] ]
}; };
@ -88,7 +88,7 @@ export const language = <languages.IMonarchLanguage>{
'to', 'to',
'true', 'true',
'type', 'type',
'with', 'with'
], ],
typeKeywords: ['int', 'unit', 'string', 'tz', 'nat', 'bool'], typeKeywords: ['int', 'unit', 'string', 'tz', 'nat', 'bool'],
@ -116,7 +116,7 @@ export const language = <languages.IMonarchLanguage>{
'->', '->',
'<-', '<-',
'&&', '&&',
'||', '||'
], ],
// we include these common regular expressions // we include these common regular expressions

View file

@ -46,16 +46,19 @@ export const language = <languages.IMonarchLanguage>{
// delimiters: /[\\\[\]\s"#'(),;@^`{}~]|$/, // 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})/, 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-namespace := /^[^\\\/\[\]\d\s"#'(),;@^`{}~][^\\\[\]\s"(),;@^`{}~]*/
// simple-symbol := /^(?:\/|[^\\\/\[\]\d\s"#'(),;@^`{}~][^\\\[\]\s"(),;@^`{}~]*)/ // simple-symbol := /^(?:\/|[^\\\/\[\]\d\s"#'(),;@^`{}~][^\\\[\]\s"(),;@^`{}~]*)/
// qualified-symbol := (<simple-namespace>(<.><simple-namespace>)*</>)?<simple-symbol> // qualified-symbol := (<simple-namespace>(<.><simple-namespace>)*</>)?<simple-symbol>
qualifiedSymbols: /^(?:(?:[^\\\/\[\]\d\s"#'(),;@^`{}~][^\\\[\]\s"(),;@^`{}~]*(?:\.[^\\\/\[\]\d\s"#'(),;@^`{}~][^\\\[\]\s"(),;@^`{}~]*)*\/)?(?:\/|[^\\\/\[\]\d\s"#'(),;@^`{}~][^\\\[\]\s"(),;@^`{}~]*)*(?=[\\\[\]\s"(),;@^`{}~]|$))/, qualifiedSymbols:
/^(?:(?:[^\\\/\[\]\d\s"#'(),;@^`{}~][^\\\[\]\s"(),;@^`{}~]*(?:\.[^\\\/\[\]\d\s"#'(),;@^`{}~][^\\\[\]\s"(),;@^`{}~]*)*\/)?(?:\/|[^\\\/\[\]\d\s"#'(),;@^`{}~][^\\\[\]\s"(),;@^`{}~]*)*(?=[\\\[\]\s"(),;@^`{}~]|$))/,
specialForms: [ specialForms: [
'.', '.',

View file

@ -809,8 +809,7 @@ testTokenization('coffeescript', [
// syntax highligting issue with {} - bug 16176 // syntax highligting issue with {} - bug 16176
[ [
{ {
line: line: '"/api/v2/course/#{ $stateParams.courseId }/grading/student/#{$stateParams.studentId}",',
'"/api/v2/course/#{ $stateParams.courseId }/grading/student/#{$stateParams.studentId}",',
tokens: [ tokens: [
{ startIndex: 0, type: 'string.coffee' }, { startIndex: 0, type: 'string.coffee' },
{ startIndex: 18, type: '' }, { startIndex: 18, type: '' },

View file

@ -6,7 +6,8 @@
import type { languages } from '../fillers/monaco-editor-core'; import type { languages } from '../fillers/monaco-editor-core';
export const conf: languages.LanguageConfiguration = { export const conf: languages.LanguageConfiguration = {
wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\@\#%\^\&\*\(\)\=\$\-\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g, wordPattern:
/(-?\d*\.\d\w*)|([^\`\~\!\@\#%\^\&\*\(\)\=\$\-\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,
comments: { comments: {
blockComment: ['###', '###'], blockComment: ['###', '###'],
lineComment: '#' lineComment: '#'

View file

@ -6,7 +6,8 @@
import type { languages } from '../fillers/monaco-editor-core'; import type { languages } from '../fillers/monaco-editor-core';
export const conf: languages.LanguageConfiguration = { export const conf: languages.LanguageConfiguration = {
wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\#\$\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g, wordPattern:
/(-?\d*\.\d\w*)|([^\`\~\!\#\$\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,
comments: { comments: {
lineComment: '//', lineComment: '//',
blockComment: ['/*', '*/'] blockComment: ['/*', '*/']

View file

@ -484,8 +484,7 @@ testTokenization('css', [
// .a{background:#f5f9fc !important}.b{font-family:"Helvetica Neue", Helvetica;height:31px;} // .a{background:#f5f9fc !important}.b{font-family:"Helvetica Neue", Helvetica;height:31px;}
[ [
{ {
line: line: '.a{background:#f5f9fc !important}.b{font-family:"Helvetica Neue", Helvetica;height:31px;}',
'.a{background:#f5f9fc !important}.b{font-family:"Helvetica Neue", Helvetica;height:31px;}',
tokens: [ tokens: [
{ startIndex: 0, type: 'tag.css' }, { startIndex: 0, type: 'tag.css' },
{ startIndex: 2, type: 'delimiter.bracket.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} //.even { background: #fff url(data:image/gif;base64,R0lGODlhBgASALMAAOfn5+rq6uvr6+zs7O7u7vHx8fPz8/b29vj4+P39/f///wAAAAAAAAAAAAAAAAAAACwAAAAABgASAAAIMAAVCBxIsKDBgwgTDkzAsKGAhxARSJx4oKJFAxgzFtjIkYDHjwNCigxAsiSAkygDAgA7) repeat-x bottom}
[ [
{ {
line: line: '.even { background: #fff url(data:image/gif;base64,R0lGODlhBgASALMAAOfn5+rq6uvr6+zs7O7u7vHx8fPz8/b29vj4+P39/f///wAAAAAAAAAAAAAAAAAAACwAAAAABgASAAAIMAAVCBxIsKDBgwgTDkzAsKGAhxARSJx4oKJFAxgzFtjIkYDHjwNCigxAsiSAkygDAgA7) repeat-x bottom}',
'.even { background: #fff url(data:image/gif;base64,R0lGODlhBgASALMAAOfn5+rq6uvr6+zs7O7u7vHx8fPz8/b29vj4+P39/f///wAAAAAAAAAAAAAAAAAAACwAAAAABgASAAAIMAAVCBxIsKDBgwgTDkzAsKGAhxARSJx4oKJFAxgzFtjIkYDHjwNCigxAsiSAkygDAgA7) repeat-x bottom}',
tokens: [ tokens: [
{ startIndex: 0, type: 'tag.css' }, { startIndex: 0, type: 'tag.css' },
{ startIndex: 5, type: '' }, { startIndex: 5, type: '' },

View file

@ -53,8 +53,7 @@ testTokenization('dockerfile', [
tokens: [] tokens: []
}, },
{ {
line: line: 'ONBUILD RUN curl -sSL https://raw.githubusercontent.com/aspnet/Home/dev/kvminstall.sh | sh',
'ONBUILD RUN curl -sSL https://raw.githubusercontent.com/aspnet/Home/dev/kvminstall.sh | sh',
tokens: [ tokens: [
{ startIndex: 0, type: 'keyword.dockerfile' }, { startIndex: 0, type: 'keyword.dockerfile' },
{ startIndex: 7, type: '' }, { startIndex: 7, type: '' },
@ -79,8 +78,7 @@ testTokenization('dockerfile', [
tokens: [{ startIndex: 0, type: 'string.dockerfile' }] tokens: [{ startIndex: 0, type: 'string.dockerfile' }]
}, },
{ {
line: line: ' && kvm alias default | xargs -i ln -s $KRE_USER_HOME/packages/{} $KRE_USER_HOME/packages/default"',
' && kvm alias default | xargs -i ln -s $KRE_USER_HOME/packages/{} $KRE_USER_HOME/packages/default"',
tokens: [ tokens: [
{ startIndex: 0, type: 'string.dockerfile' }, { startIndex: 0, type: 'string.dockerfile' },
{ startIndex: 42, type: 'variable.dockerfile' }, { startIndex: 42, type: 'variable.dockerfile' },
@ -94,8 +92,7 @@ testTokenization('dockerfile', [
tokens: [] tokens: []
}, },
{ {
line: line: '# Install libuv for Kestrel from source code (binary is not in wheezy and one in jessie is still too old)',
'# 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' }] tokens: [{ startIndex: 0, type: 'comment.dockerfile' }]
}, },
{ {
@ -129,8 +126,7 @@ testTokenization('dockerfile', [
] ]
}, },
{ {
line: line: ' && curl -sSL https://github.com/joyent/libuv/archive/v${LIBUV_VERSION}.tar.gz | tar zxfv - -C /usr/local/src \\',
' && curl -sSL https://github.com/joyent/libuv/archive/v${LIBUV_VERSION}.tar.gz | tar zxfv - -C /usr/local/src \\',
tokens: [ tokens: [
{ startIndex: 0, type: '' }, { startIndex: 0, type: '' },
{ startIndex: 58, type: 'variable.dockerfile' }, { startIndex: 58, type: 'variable.dockerfile' },

View file

@ -108,7 +108,8 @@ export const language = <languages.IMonarchLanguage>{
// Matches any of the operator names: // 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 // See https://hexdocs.pm/elixir/syntax-reference.html#variables
variableName: /[a-z_][a-zA-Z0-9_]*[?!]?/, variableName: /[a-z_][a-zA-Z0-9_]*[?!]?/,

View file

@ -76,7 +76,8 @@ export const language = <languages.IMonarchLanguage>{
symbols: /[=><!~?:&|+\-*\/\^%]+/, symbols: /[=><!~?:&|+\-*\/\^%]+/,
escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/, escapes: /\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,
terraformFunctions: /(abs|ceil|floor|log|max|min|pow|signum|chomp|format|formatlist|indent|join|lower|regex|regexall|replace|split|strrev|substr|title|trimspace|upper|chunklist|coalesce|coalescelist|compact|concat|contains|distinct|element|flatten|index|keys|length|list|lookup|map|matchkeys|merge|range|reverse|setintersection|setproduct|setunion|slice|sort|transpose|values|zipmap|base64decode|base64encode|base64gzip|csvdecode|jsondecode|jsonencode|urlencode|yamldecode|yamlencode|abspath|dirname|pathexpand|basename|file|fileexists|fileset|filebase64|templatefile|formatdate|timeadd|timestamp|base64sha256|base64sha512|bcrypt|filebase64sha256|filebase64sha512|filemd5|filemd1|filesha256|filesha512|md5|rsadecrypt|sha1|sha256|sha512|uuid|uuidv5|cidrhost|cidrnetmask|cidrsubnet|tobool|tolist|tomap|tonumber|toset|tostring)/, terraformFunctions:
/(abs|ceil|floor|log|max|min|pow|signum|chomp|format|formatlist|indent|join|lower|regex|regexall|replace|split|strrev|substr|title|trimspace|upper|chunklist|coalesce|coalescelist|compact|concat|contains|distinct|element|flatten|index|keys|length|list|lookup|map|matchkeys|merge|range|reverse|setintersection|setproduct|setunion|slice|sort|transpose|values|zipmap|base64decode|base64encode|base64gzip|csvdecode|jsondecode|jsonencode|urlencode|yamldecode|yamlencode|abspath|dirname|pathexpand|basename|file|fileexists|fileset|filebase64|templatefile|formatdate|timeadd|timestamp|base64sha256|base64sha512|bcrypt|filebase64sha256|filebase64sha512|filemd5|filemd1|filesha256|filesha512|md5|rsadecrypt|sha1|sha256|sha512|uuid|uuidv5|cidrhost|cidrnetmask|cidrsubnet|tobool|tolist|tomap|tonumber|toset|tostring)/,
terraformMainBlocks: /(module|data|terraform|resource|provider|variable|output|locals)/, terraformMainBlocks: /(module|data|terraform|resource|provider|variable|output|locals)/,
tokenizer: { tokenizer: {
root: [ root: [

View file

@ -7,7 +7,8 @@ import type { languages } from '../fillers/monaco-editor-core';
export const conf: languages.LanguageConfiguration = { export const conf: languages.LanguageConfiguration = {
// the default separators except `@$` // the default separators except `@$`
wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g, wordPattern:
/(-?\d*\.\d\w*)|([^\`\~\!\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,
comments: { comments: {
lineComment: '//', lineComment: '//',
blockComment: ['/*', '*/'] blockComment: ['/*', '*/']

View file

@ -7,7 +7,8 @@ import type { languages } from '../fillers/monaco-editor-core';
export const conf: languages.LanguageConfiguration = { export const conf: languages.LanguageConfiguration = {
// the default separators except `@$` // the default separators except `@$`
wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g, wordPattern:
/(-?\d*\.\d\w*)|([^\`\~\!\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,
comments: { comments: {
lineComment: '//', lineComment: '//',
blockComment: ['/*', '*/'] blockComment: ['/*', '*/']

View file

@ -1001,8 +1001,7 @@ testTokenization(
[ [
{ {
line: 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))); }',
'.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: [ tokens: [
{ startIndex: 0, type: 'tag.class.less' }, { startIndex: 0, type: 'tag.class.less' },
{ startIndex: 12, type: 'delimiter.parenthesis.less' }, { startIndex: 12, type: 'delimiter.parenthesis.less' },

View file

@ -118,8 +118,7 @@ testTokenization(
// If tag / keywords / block style tags // If tag / keywords / block style tags
[ [
{ {
line: line: '<div>{% if true=false %}<div>True</div>{% else %}<div>False</div>{% endif %}</div>',
'<div>{% if true=false %}<div>True</div>{% else %}<div>False</div>{% endif %}</div>',
tokens: [ tokens: [
{ startIndex: 0, type: 'delimiter.html' }, { startIndex: 0, type: 'delimiter.html' },
{ startIndex: 1, type: 'tag.html' }, { startIndex: 1, type: 'tag.html' },
@ -187,8 +186,7 @@ testTokenization(
// Raw tag // Raw tag
[ [
{ {
line: line: '<div>Everything here should be escaped {% raw %} In Handlebars, {{ this }} will be HTML-escaped, but {{{ that }}} will not. {% endraw %}</div>',
'<div>Everything here should be escaped {% raw %} In Handlebars, {{ this }} will be HTML-escaped, but {{{ that }}} will not. {% endraw %}</div>',
tokens: [ tokens: [
{ startIndex: 0, type: 'delimiter.html' }, { startIndex: 0, type: 'delimiter.html' },
{ startIndex: 1, type: 'tag.html' }, { startIndex: 1, type: 'tag.html' },

View file

@ -216,7 +216,7 @@ export const language = <languages.IMonarchLanguage>{
[/^(?!\{\%\s*endraw\s*\%\}).+/], [/^(?!\{\%\s*endraw\s*\%\}).+/],
[/\{\%/, 'delimiter.tag.liquid'], [/\{\%/, 'delimiter.tag.liquid'],
[/@identifier/], [/@identifier/],
[/\%\}/, { token: 'delimiter.tag.liquid', next: '@root' }], [/\%\}/, { token: 'delimiter.tag.liquid', next: '@root' }]
], ],
liquidRoot: [ liquidRoot: [

View file

@ -6,7 +6,8 @@
import type { languages } from '../fillers/monaco-editor-core'; import type { languages } from '../fillers/monaco-editor-core';
export const conf: languages.LanguageConfiguration = { export const conf: languages.LanguageConfiguration = {
wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\@\#%\^\&\*\(\)\=\$\-\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g, wordPattern:
/(-?\d*\.\d\w*)|([^\`\~\!\@\#%\^\&\*\(\)\=\$\-\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,
comments: { comments: {
blockComment: ['###', '###'], blockComment: ['###', '###'],
lineComment: '#' lineComment: '#'

View file

@ -9,8 +9,7 @@ testTokenization('objective-c', [
// Keywords // Keywords
[ [
{ {
line: line: '-(id) initWithParams:(id<anObject>) aHandler withDeviceStateManager:(id<anotherObject>) deviceStateManager',
'-(id) initWithParams:(id<anObject>) aHandler withDeviceStateManager:(id<anotherObject>) deviceStateManager',
tokens: [ tokens: [
{ startIndex: 0, type: '' }, { startIndex: 0, type: '' },
{ startIndex: 1, type: 'delimiter.parenthesis.objective-c' }, { startIndex: 1, type: 'delimiter.parenthesis.objective-c' },

View file

@ -7,7 +7,8 @@ import type { languages } from '../fillers/monaco-editor-core';
export const conf: languages.LanguageConfiguration = { export const conf: languages.LanguageConfiguration = {
// the default separators except `@$` // the default separators except `@$`
wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g, wordPattern:
/(-?\d*\.\d\w*)|([^\`\~\!\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,
comments: { comments: {
lineComment: '//', lineComment: '//',
blockComment: ['{', '}'] blockComment: ['{', '}']

View file

@ -2258,8 +2258,7 @@ testTokenization(
// HTML (CSS (PHP)), HTML ( PHP, JS (PHP), PHP) // HTML (CSS (PHP)), HTML ( PHP, JS (PHP), PHP)
[ [
{ {
line: line: '<html><style><?="div"?> { color:blue; }</style><!--<?="HTML Comment"?>--><script>var x = 3;/* <?="JS Comment"/*</script>*/?> */var y = 4;</script></html><? $x = 3;?>',
'<html><style><?="div"?> { color:blue; }</style><!--<?="HTML Comment"?>--><script>var x = 3;/* <?="JS Comment"/*</script>*/?> */var y = 4;</script></html><? $x = 3;?>',
tokens: [ tokens: [
{ startIndex: 0, type: 'delimiter.html' }, { startIndex: 0, type: 'delimiter.html' },
{ startIndex: 1, type: 'tag.html' }, { startIndex: 1, type: 'tag.html' },

View file

@ -6,7 +6,8 @@
import type { languages } from '../fillers/monaco-editor-core'; import type { languages } from '../fillers/monaco-editor-core';
export const conf: languages.LanguageConfiguration = { export const conf: languages.LanguageConfiguration = {
wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\@\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g, wordPattern:
/(-?\d*\.\d\w*)|([^\`\~\!\@\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,
comments: { comments: {
lineComment: '//', lineComment: '//',

View file

@ -459,7 +459,8 @@ export const language = <languages.IMonarchLanguage>{
fexponent_bin: /[pP][+-]?[0-9]+/, fexponent_bin: /[pP][+-]?[0-9]+/,
deciexp: /\.[0-9]*@fexponent?/, deciexp: /\.[0-9]*@fexponent?/,
hexiexp: /\.[0-9a-zA-Z]*@fexponent_bin?/, 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\\\?'"\(\[\{]/, ESCHAR: /[ntvbrfa\\\?'"\(\[\{]/,
start: 'root', start: 'root',

View file

@ -480,8 +480,7 @@ testTokenization('powershell', [
] ]
}, },
{ {
line: line: '#the object info array contains hashmaps, each of which represent a parameter set and describe a target in the XenCenter resource list',
'#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' }] tokens: [{ startIndex: 0, type: 'comment.ps1' }]
}, },
{ {
@ -527,8 +526,7 @@ testTokenization('powershell', [
] ]
}, },
{ {
line: 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',
' #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: [ tokens: [
{ startIndex: 0, type: '' }, { startIndex: 0, type: '' },
{ startIndex: 2, type: 'comment.ps1' } { startIndex: 2, type: 'comment.ps1' }
@ -622,8 +620,7 @@ testTokenization('powershell', [
] ]
}, },
{ {
line: line: ' #When a disconnected server is selected there is no session information, we get null for everything except class',
' #When a disconnected server is selected there is no session information, we get null for everything except class',
tokens: [ tokens: [
{ startIndex: 0, type: '' }, { startIndex: 0, type: '' },
{ startIndex: 2, type: 'comment.ps1' } { startIndex: 2, type: 'comment.ps1' }
@ -662,8 +659,7 @@ testTokenization('powershell', [
] ]
}, },
{ {
line: line: ' Connect-XenServer -url $parameterSet["url"] -opaqueref $parameterSet["sessionRef"]',
' Connect-XenServer -url $parameterSet["url"] -opaqueref $parameterSet["sessionRef"]',
tokens: [ tokens: [
{ startIndex: 0, type: '' }, { startIndex: 0, type: '' },
{ startIndex: 20, type: 'delimiter.ps1' }, { startIndex: 20, type: 'delimiter.ps1' },
@ -689,16 +685,14 @@ testTokenization('powershell', [
] ]
}, },
{ {
line: line: ' #-properties allows us to filter the results to just include the selected object',
' #-properties allows us to filter the results to just include the selected object',
tokens: [ tokens: [
{ startIndex: 0, type: '' }, { startIndex: 0, type: '' },
{ startIndex: 2, type: 'comment.ps1' } { startIndex: 2, type: 'comment.ps1' }
] ]
}, },
{ {
line: line: ' $exp = "Get-XenServer:{0} -properties @{{uuid=\'{1}\'}}" -f $parameterSet["class"], $parameterSet["objUuid"]',
' $exp = "Get-XenServer:{0} -properties @{{uuid=\'{1}\'}}" -f $parameterSet["class"], $parameterSet["objUuid"]',
tokens: [ tokens: [
{ startIndex: 0, type: '' }, { startIndex: 0, type: '' },
{ startIndex: 2, type: 'variable.ps1' }, { startIndex: 2, type: 'variable.ps1' },

View file

@ -7,7 +7,8 @@ import type { languages } from '../fillers/monaco-editor-core';
export const conf: languages.LanguageConfiguration = { export const conf: languages.LanguageConfiguration = {
// the default separators except `$-` // the default separators except `$-`
wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\@\#%\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g, wordPattern:
/(-?\d*\.\d\w*)|([^\`\~\!\@\#%\^\&\*\(\)\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,
comments: { comments: {
lineComment: '#', lineComment: '#',
blockComment: ['<#', '#>'] blockComment: ['<#', '#>']
@ -90,7 +91,8 @@ export const language = <languages.IMonarchLanguage>{
'configuration' '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 // we include these common regular expressions
symbols: /[=><!~?&%|+\-*\/\^;\.,]+/, symbols: /[=><!~?&%|+\-*\/\^;\.,]+/,

View file

@ -380,8 +380,7 @@ testTokenization('pug', [
] ]
}, },
{ {
line: line: ' // Disclaimer: You will need to turn insertSpaces to true in order for the',
' // Disclaimer: You will need to turn insertSpaces to true in order for the',
tokens: [{ startIndex: 0, type: 'comment.pug' }] tokens: [{ startIndex: 0, type: 'comment.pug' }]
}, },
{ {

View file

@ -110,10 +110,8 @@ testTokenization('r', [
] ]
}, },
{ {
line: " ", line: ' ',
tokens: [ tokens: [{ startIndex: 0, type: 'white.r' }]
{ startIndex: 0, type: 'white.r' },
]
} }
], ],

View file

@ -12,7 +12,8 @@ export const conf: languages.LanguageConfiguration = {
* unary_<op> is allowed as an identifier. * unary_<op> is allowed as an identifier.
* <name>_= is allowed as an identifier. * <name>_= 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: { comments: {
lineComment: '//', lineComment: '//',
blockComment: ['/*', '*/'] blockComment: ['/*', '*/']

View file

@ -143,8 +143,10 @@ export const language = <languages.IMonarchLanguage>{
symbols: /[=(){}\[\].,:;@#\_&\-<>`?!+*\\\/]/, symbols: /[=(){}\[\].,:;@#\_&\-<>`?!+*\\\/]/,
// Moved . to operatorstart so it can be a delimiter // 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]/, operatorstart:
operatorend: /[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE00-\uFE0F\uFE20-\uFE2F\uE0100-\uE01EF]/, /[\/=\-+!*%<>&|^~?\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))*/, operators: /(@operatorstart)((@operatorstart)|(@operatorend))*/,
// TODO(owensd): These are borrowed from C#; need to validate correctness for Swift. // TODO(owensd): These are borrowed from C#; need to validate correctness for Swift.

View file

@ -335,8 +335,7 @@ testTokenization('systemverilog', [
], ],
[ [
{ {
line: line: 'typedef enum int {FAST_SIM = 0, RANDOM = 1, NOMINAL = 2, START_UP = 3} clock_plan_e;',
'typedef enum int {FAST_SIM = 0, RANDOM = 1, NOMINAL = 2, START_UP = 3} clock_plan_e;',
tokens: [ tokens: [
{ startIndex: 0, type: 'keyword.typedef.sv' }, { startIndex: 0, type: 'keyword.typedef.sv' },
{ startIndex: 7, type: '' }, { startIndex: 7, type: '' },

View file

@ -6,7 +6,8 @@
import { languages } from '../fillers/monaco-editor-core'; import { languages } from '../fillers/monaco-editor-core';
export const conf: languages.LanguageConfiguration = { export const conf: languages.LanguageConfiguration = {
wordPattern: /(-?\d*\.\d\w*)|([^\`\~\!\@\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g, wordPattern:
/(-?\d*\.\d\w*)|([^\`\~\!\@\#\%\^\&\*\(\)\-\=\+\[\{\]\}\\\|\;\:\'\"\,\.\<\>\/\?\s]+)/g,
comments: { comments: {
lineComment: '//', lineComment: '//',

View file

@ -452,8 +452,7 @@ testTokenization('yaml', [
], ],
[ [
{ {
line: line: "text: Pretty vector drawing. #this is comment doesn't have proper syntax higlighting",
"text: Pretty vector drawing. #this is comment doesn't have proper syntax higlighting",
tokens: [ tokens: [
{ startIndex: 0, type: 'type.yaml' }, { startIndex: 0, type: 'type.yaml' },
{ startIndex: 4, type: 'operators.yaml' }, { startIndex: 4, type: 'operators.yaml' },