diff --git a/samples/browser-esm-webpack-typescript-react/package-lock.json b/samples/browser-esm-webpack-typescript-react/package-lock.json index 72e8bcf4..467d64e9 100644 --- a/samples/browser-esm-webpack-typescript-react/package-lock.json +++ b/samples/browser-esm-webpack-typescript-react/package-lock.json @@ -2822,9 +2822,9 @@ "dev": true }, "node_modules/json5": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz", - "integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==", + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", "dev": true, "bin": { "json5": "lib/cli.js" @@ -5639,9 +5639,9 @@ "dev": true }, "json5": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz", - "integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==", + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", "dev": true }, "loader-runner": { diff --git a/samples/package-lock.json b/samples/package-lock.json index ab2c69ff..dddf7e94 100644 --- a/samples/package-lock.json +++ b/samples/package-lock.json @@ -10,7 +10,7 @@ "license": "MIT", "devDependencies": { "css-loader": "^5.2.7", - "electron": "^19.1.6", + "electron": "^19.1.8", "file-loader": "^6.2.0", "glob": "^7.2.0", "html-webpack-plugin": "^5.5.0", @@ -1372,9 +1372,9 @@ "license": "MIT" }, "node_modules/electron": { - "version": "19.1.6", - "resolved": "https://registry.npmjs.org/electron/-/electron-19.1.6.tgz", - "integrity": "sha512-bT6Mr7JbHbONpr/U7R47lwTkMUvuAyOfnoLlbDqvGocQyZCCN3JB436wtf2+r3/IpMEz3T+dHLweFDY5i2wuxw==", + "version": "19.1.8", + "resolved": "https://registry.npmjs.org/electron/-/electron-19.1.8.tgz", + "integrity": "sha512-UfPQdFjgKI0xCm1V5sV3iAVOs0kCwAE91xWzV5tI7ij14yOkxTdXp9BqTzFaSbQYLYxn6q1BUUe1nlzjJjzAnw==", "dev": true, "hasInstallScript": true, "dependencies": { @@ -2417,9 +2417,10 @@ "optional": true }, "node_modules/json5": { - "version": "2.2.1", + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", "dev": true, - "license": "MIT", "bin": { "json5": "lib/cli.js" }, @@ -5427,9 +5428,9 @@ "dev": true }, "electron": { - "version": "19.1.6", - "resolved": "https://registry.npmjs.org/electron/-/electron-19.1.6.tgz", - "integrity": "sha512-bT6Mr7JbHbONpr/U7R47lwTkMUvuAyOfnoLlbDqvGocQyZCCN3JB436wtf2+r3/IpMEz3T+dHLweFDY5i2wuxw==", + "version": "19.1.8", + "resolved": "https://registry.npmjs.org/electron/-/electron-19.1.8.tgz", + "integrity": "sha512-UfPQdFjgKI0xCm1V5sV3iAVOs0kCwAE91xWzV5tI7ij14yOkxTdXp9BqTzFaSbQYLYxn6q1BUUe1nlzjJjzAnw==", "dev": true, "requires": { "@electron/get": "2.0.0", @@ -6082,7 +6083,9 @@ "optional": true }, "json5": { - "version": "2.2.1", + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", "dev": true }, "jsonfile": { diff --git a/samples/package.json b/samples/package.json index 923fde19..89bb8b98 100644 --- a/samples/package.json +++ b/samples/package.json @@ -11,7 +11,7 @@ "license": "MIT", "devDependencies": { "css-loader": "^5.2.7", - "electron": "^19.1.6", + "electron": "^19.1.8", "file-loader": "^6.2.0", "glob": "^7.2.0", "html-webpack-plugin": "^5.5.0", diff --git a/src/basic-languages/elixir/elixir.test.ts b/src/basic-languages/elixir/elixir.test.ts index bd60257e..fe68c922 100644 --- a/src/basic-languages/elixir/elixir.test.ts +++ b/src/basic-languages/elixir/elixir.test.ts @@ -383,5 +383,32 @@ testTokenization('elixir', [ { startIndex: 15, type: 'delimiter.square.elixir' } ] } + ], + // Bitstrings + [ + { + line: '<>', + 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' } + ] + } ] ]); diff --git a/src/basic-languages/elixir/elixir.ts b/src/basic-languages/elixir/elixir.ts index ad974a20..078d1030 100644 --- a/src/basic-languages/elixir/elixir.ts +++ b/src/basic-languages/elixir/elixir.ts @@ -167,7 +167,7 @@ export const language = { // 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 = { next: '@doubleQuotedHeredocDocstring' } ], + [ + /\@(module|type)?doc (~[sS])?'''/, + { + token: 'comment.block.documentation', + next: '@singleQuotedHeredocDocstring' + } + ], [ /\@(module|type)?doc (~[sS])?"/, { @@ -539,6 +546,13 @@ export const language = { 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 = { { 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: [ diff --git a/webpack-plugin/package-lock.json b/webpack-plugin/package-lock.json index 4705db44..91dc71fd 100644 --- a/webpack-plugin/package-lock.json +++ b/webpack-plugin/package-lock.json @@ -939,9 +939,9 @@ "dev": true }, "node_modules/json5": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz", - "integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==", + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", "bin": { "json5": "lib/cli.js" }, @@ -2531,9 +2531,9 @@ "dev": true }, "json5": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz", - "integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==" + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==" }, "kind-of": { "version": "6.0.3",