mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 13:55:41 +01:00
Merge remote-tracking branch 'jakebailey/fix-compile-regex-parse' into feat/updates
This commit is contained in:
commit
4d7ea90dd9
12 changed files with 17 additions and 16 deletions
|
|
@ -6,7 +6,7 @@
|
|||
import type { languages } from '../../fillers/monaco-editor-core';
|
||||
|
||||
export const conf: languages.LanguageConfiguration = {
|
||||
wordPattern: /(#?-?\d*\.\d\w*%?)|((::|[@#.!:])?[\w-?]+%?)|::|[@#.!:]/g,
|
||||
wordPattern: /(#?-?\d*\.\d\w*%?)|((::|[@#.!:])?[\w-]+%?)|::|[@#.!:]/g,
|
||||
|
||||
comments: {
|
||||
blockComment: ['/*', '*/']
|
||||
|
|
|
|||
|
|
@ -415,7 +415,7 @@ export const language = <languages.IMonarchLanguage>{
|
|||
[/@typesone/, 'type'],
|
||||
|
||||
[
|
||||
/[a-zA-Z_$][\w-$]*/,
|
||||
/[a-zA-Z_$][\w$-]*/,
|
||||
{
|
||||
cases: {
|
||||
'@functions': 'keyword.function',
|
||||
|
|
|
|||
|
|
@ -61,7 +61,7 @@ export const conf: languages.LanguageConfiguration = {
|
|||
`<(?!(?:${EMPTY_ELEMENTS.join('|')}))([_:\\w][_:\\w-.\\d]*)([^/>]*(?!/)>)[^<]*$`,
|
||||
'i'
|
||||
),
|
||||
afterText: /^<\/([_:\w][_:\w-.\d]*)\s*>$/i,
|
||||
afterText: /^<\/([_:\w][_:\w.\d-]*)\s*>$/i,
|
||||
action: {
|
||||
indentAction: languages.IndentAction.IndentOutdent
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
import type { languages } from '../../fillers/monaco-editor-core';
|
||||
|
||||
export const conf: languages.LanguageConfiguration = {
|
||||
wordPattern: /(#?-?\d*\.\d\w*%?)|([@#!.:]?[\w-?]+%?)|[@#!.]/g,
|
||||
wordPattern: /(#?-?\d*\.\d\w*%?)|([@#!.:]?[\w-]+%?)|[@#!.]/g,
|
||||
comments: {
|
||||
blockComment: ['/*', '*/'],
|
||||
lineComment: '//'
|
||||
|
|
|
|||
|
|
@ -173,7 +173,7 @@ export const language = <languages.IMonarchLanguage>{
|
|||
|
||||
// Integer- and real literals
|
||||
[/[0-9]+\.[0-9]+(?:[DdEeXx][\+\-]?[0-9]+)?/, 'number.float'],
|
||||
[/[0-9]+(?:\_[0-9a-fA-F]+)?L?/, 'number'],
|
||||
[/[0-9]+(?:_[0-9a-fA-F]+)?L?/, 'number'],
|
||||
|
||||
// Operators, relations, and delimiters
|
||||
[
|
||||
|
|
|
|||
|
|
@ -261,7 +261,7 @@ export const language = <languages.IMonarchLanguage>{
|
|||
'#'
|
||||
],
|
||||
|
||||
escapes: /\\([nrt0\"''\\]|x\h{2}|u\{\h{1,6}\})/,
|
||||
escapes: /\\([nrt0\"''\\]|x[0-9a-fA-F]{2}|u\{[0-9a-fA-F]{1,6}\})/,
|
||||
delimiters: /[,]/,
|
||||
symbols: /[\#\!\%\&\*\+\-\.\/\:\;\<\=\>\@\^\|_\?]+/,
|
||||
intSuffixes: /[iu](8|16|32|64|128|size)/,
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
import type { languages } from '../../fillers/monaco-editor-core';
|
||||
|
||||
export const conf: languages.LanguageConfiguration = {
|
||||
wordPattern: /(#?-?\d*\.\d\w*%?)|([@$#!.:]?[\w-?]+%?)|[@#!.]/g,
|
||||
wordPattern: /(#?-?\d*\.\d\w*%?)|([@$#!.:]?[\w?-]+%?)|[@#!.]/g,
|
||||
comments: {
|
||||
blockComment: ['/*', '*/'],
|
||||
lineComment: '//'
|
||||
|
|
|
|||
|
|
@ -355,12 +355,12 @@ export const language = <languages.IMonarchLanguage>{
|
|||
root: [
|
||||
[/(\.\.)/, 'delimiter'],
|
||||
|
||||
[/\b(16#[0-9A-Fa-f\_]*)+\b/, 'number.hex'],
|
||||
[/\b(2#[01\_]+)+\b/, 'number.binary'],
|
||||
[/\b(8#[0-9\_]*)+\b/, 'number.octal'],
|
||||
[/\b(16#[0-9A-Fa-f_]*)+\b/, 'number.hex'],
|
||||
[/\b(2#[01_]+)+\b/, 'number.binary'],
|
||||
[/\b(8#[0-9_]*)+\b/, 'number.octal'],
|
||||
[/\b\d*\.\d+([eE][\-+]?\d+)?\b/, 'number.float'],
|
||||
[/\b(L?REAL)#[0-9\_\.e]+\b/, 'number.float'],
|
||||
[/\b(BYTE|(?:D|L)?WORD|U?(?:S|D|L)?INT)#[0-9\_]+\b/, 'number'],
|
||||
[/\b(L?REAL)#[0-9_\.e]+\b/, 'number.float'],
|
||||
[/\b(BYTE|(?:D|L)?WORD|U?(?:S|D|L)?INT)#[0-9_]+\b/, 'number'],
|
||||
[/\d+/, 'number'],
|
||||
|
||||
[/\b(T|DT|TOD)#[0-9:-_shmyd]+\b/, 'tag'],
|
||||
|
|
|
|||
|
|
@ -204,7 +204,7 @@ export const language = <languages.IMonarchLanguage>{
|
|||
'__owned'
|
||||
],
|
||||
|
||||
symbols: /[=(){}\[\].,:;@#\_&\-<>`?!+*\\\/]/,
|
||||
symbols: /[=(){}\[\].,:;@#_&\-<>`?!+*\\\/]/,
|
||||
|
||||
// Moved . to operatorstart so it can be a delimiter
|
||||
operatorstart:
|
||||
|
|
|
|||
|
|
@ -358,7 +358,7 @@ const operators = qw(`
|
|||
|
||||
const directive_re = /enable|requires|diagnostic/;
|
||||
|
||||
const ident_re = /[_\p{XID_Start}]\p{XID_Continue}*/u;
|
||||
const ident_re = new RegExp(`[_\\p{XID_Start}]\\p{XID_Continue}*`, 'u');
|
||||
|
||||
const predefined_token = 'variable.predefined';
|
||||
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ export const conf: languages.LanguageConfiguration = {
|
|||
onEnterRules: [
|
||||
{
|
||||
beforeText: new RegExp(`<([_:\\w][_:\\w-.\\d]*)([^/>]*(?!/)>)[^<]*$`, 'i'),
|
||||
afterText: /^<\/([_:\w][_:\w-.\d]*)\s*>$/i,
|
||||
afterText: /^<\/([_:\w][_:\w.\d-]*)\s*>$/i,
|
||||
action: {
|
||||
indentAction: languages.IndentAction.IndentOutdent
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,5 +10,6 @@
|
|||
"sourceMap": true,
|
||||
"allowJs": true,
|
||||
"checkJs": false
|
||||
}
|
||||
},
|
||||
"exclude": ["language/typescript/lib/typescriptServices.js"]
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue