Merge remote-tracking branch 'jakebailey/fix-compile-regex-parse' into feat/updates

This commit is contained in:
Maxwell Brown 2024-10-26 12:02:07 -04:00
commit 4d7ea90dd9
No known key found for this signature in database
12 changed files with 17 additions and 16 deletions

View file

@ -6,7 +6,7 @@
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*%?)|((::|[@#.!:])?[\w-?]+%?)|::|[@#.!:]/g, wordPattern: /(#?-?\d*\.\d\w*%?)|((::|[@#.!:])?[\w-]+%?)|::|[@#.!:]/g,
comments: { comments: {
blockComment: ['/*', '*/'] blockComment: ['/*', '*/']

View file

@ -415,7 +415,7 @@ export const language = <languages.IMonarchLanguage>{
[/@typesone/, 'type'], [/@typesone/, 'type'],
[ [
/[a-zA-Z_$][\w-$]*/, /[a-zA-Z_$][\w$-]*/,
{ {
cases: { cases: {
'@functions': 'keyword.function', '@functions': 'keyword.function',

View file

@ -61,7 +61,7 @@ export const conf: languages.LanguageConfiguration = {
`<(?!(?:${EMPTY_ELEMENTS.join('|')}))([_:\\w][_:\\w-.\\d]*)([^/>]*(?!/)>)[^<]*$`, `<(?!(?:${EMPTY_ELEMENTS.join('|')}))([_:\\w][_:\\w-.\\d]*)([^/>]*(?!/)>)[^<]*$`,
'i' 'i'
), ),
afterText: /^<\/([_:\w][_:\w-.\d]*)\s*>$/i, afterText: /^<\/([_:\w][_:\w.\d-]*)\s*>$/i,
action: { action: {
indentAction: languages.IndentAction.IndentOutdent indentAction: languages.IndentAction.IndentOutdent
} }

View file

@ -6,7 +6,7 @@
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*%?)|([@#!.:]?[\w-?]+%?)|[@#!.]/g, wordPattern: /(#?-?\d*\.\d\w*%?)|([@#!.:]?[\w-]+%?)|[@#!.]/g,
comments: { comments: {
blockComment: ['/*', '*/'], blockComment: ['/*', '*/'],
lineComment: '//' lineComment: '//'

View file

@ -173,7 +173,7 @@ export const language = <languages.IMonarchLanguage>{
// Integer- and real literals // Integer- and real literals
[/[0-9]+\.[0-9]+(?:[DdEeXx][\+\-]?[0-9]+)?/, 'number.float'], [/[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 // Operators, relations, and delimiters
[ [

View file

@ -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: /[,]/, delimiters: /[,]/,
symbols: /[\#\!\%\&\*\+\-\.\/\:\;\<\=\>\@\^\|_\?]+/, symbols: /[\#\!\%\&\*\+\-\.\/\:\;\<\=\>\@\^\|_\?]+/,
intSuffixes: /[iu](8|16|32|64|128|size)/, intSuffixes: /[iu](8|16|32|64|128|size)/,

View file

@ -6,7 +6,7 @@
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*%?)|([@$#!.:]?[\w-?]+%?)|[@#!.]/g, wordPattern: /(#?-?\d*\.\d\w*%?)|([@$#!.:]?[\w?-]+%?)|[@#!.]/g,
comments: { comments: {
blockComment: ['/*', '*/'], blockComment: ['/*', '*/'],
lineComment: '//' lineComment: '//'

View file

@ -355,12 +355,12 @@ export const language = <languages.IMonarchLanguage>{
root: [ root: [
[/(\.\.)/, 'delimiter'], [/(\.\.)/, 'delimiter'],
[/\b(16#[0-9A-Fa-f\_]*)+\b/, 'number.hex'], [/\b(16#[0-9A-Fa-f_]*)+\b/, 'number.hex'],
[/\b(2#[01\_]+)+\b/, 'number.binary'], [/\b(2#[01_]+)+\b/, 'number.binary'],
[/\b(8#[0-9\_]*)+\b/, 'number.octal'], [/\b(8#[0-9_]*)+\b/, 'number.octal'],
[/\b\d*\.\d+([eE][\-+]?\d+)?\b/, 'number.float'], [/\b\d*\.\d+([eE][\-+]?\d+)?\b/, 'number.float'],
[/\b(L?REAL)#[0-9\_\.e]+\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(BYTE|(?:D|L)?WORD|U?(?:S|D|L)?INT)#[0-9_]+\b/, 'number'],
[/\d+/, 'number'], [/\d+/, 'number'],
[/\b(T|DT|TOD)#[0-9:-_shmyd]+\b/, 'tag'], [/\b(T|DT|TOD)#[0-9:-_shmyd]+\b/, 'tag'],

View file

@ -204,7 +204,7 @@ export const language = <languages.IMonarchLanguage>{
'__owned' '__owned'
], ],
symbols: /[=(){}\[\].,:;@#\_&\-<>`?!+*\\\/]/, symbols: /[=(){}\[\].,:;@#_&\-<>`?!+*\\\/]/,
// Moved . to operatorstart so it can be a delimiter // Moved . to operatorstart so it can be a delimiter
operatorstart: operatorstart:

View file

@ -358,7 +358,7 @@ const operators = qw(`
const directive_re = /enable|requires|diagnostic/; 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'; const predefined_token = 'variable.predefined';

View file

@ -23,7 +23,7 @@ export const conf: languages.LanguageConfiguration = {
onEnterRules: [ onEnterRules: [
{ {
beforeText: new RegExp(`<([_:\\w][_:\\w-.\\d]*)([^/>]*(?!/)>)[^<]*$`, 'i'), beforeText: new RegExp(`<([_:\\w][_:\\w-.\\d]*)([^/>]*(?!/)>)[^<]*$`, 'i'),
afterText: /^<\/([_:\w][_:\w-.\d]*)\s*>$/i, afterText: /^<\/([_:\w][_:\w.\d-]*)\s*>$/i,
action: { action: {
indentAction: languages.IndentAction.IndentOutdent indentAction: languages.IndentAction.IndentOutdent
} }

View file

@ -10,5 +10,6 @@
"sourceMap": true, "sourceMap": true,
"allowJs": true, "allowJs": true,
"checkJs": false "checkJs": false
} },
"exclude": ["language/typescript/lib/typescriptServices.js"]
} }