Update ACE Editor to version 1.2.9

The new ACE editor introduces full support for emojis (and, thereby, UTF-16 characters with high- and low-surrogates). Hence, we can remove our custom fix.

Further, this update will allow emojis to be used in pair programming sessions.
This commit is contained in:
Sebastian Serth
2023-09-12 18:45:47 +02:00
parent 13bd68d760
commit 60656443e2
210 changed files with 66466 additions and 33266 deletions

View File

@ -7,7 +7,7 @@ var TextHighlightRules = require("./text_highlight_rules").TextHighlightRules;
var ForthHighlightRules = function() {
this.$rules = { start: [ { include: '#forth' } ],
'#comment':
'#comment':
[ { token: 'comment.line.double-dash.forth',
regex: '(?:^|\\s)--\\s.*$',
comment: 'line comments for iForth' },
@ -19,7 +19,7 @@ var ForthHighlightRules = function() {
comment: 'gForth line comment' },
{ token: 'comment.block.forth',
regex: '(?:^|\\s)\\(\\*(?=\\s|$)',
push:
push:
[ { token: 'comment.block.forth',
regex: '(?:^|\\s)\\*\\)(?=\\s|$)',
next: 'pop' },
@ -28,7 +28,7 @@ var ForthHighlightRules = function() {
{ token: 'comment.block.documentation.forth',
regex: '\\bDOC\\b',
caseInsensitive: true,
push:
push:
[ { token: 'comment.block.documentation.forth',
regex: '\\bENDDOC\\b',
caseInsensitive: true,
@ -38,7 +38,7 @@ var ForthHighlightRules = function() {
{ token: 'comment.line.parentheses.forth',
regex: '(?:^|\\s)\\.?\\( [^)]*\\)',
comment: 'ANSI line comment' } ],
'#constant':
'#constant':
[ { token: 'constant.language.forth',
regex: '(?:^|\\s)(?:TRUE|FALSE|BL|PI|CELL|C/L|R/O|W/O|R/W)(?=\\s|$)',
caseInsensitive: true},
@ -46,7 +46,7 @@ var ForthHighlightRules = function() {
regex: '(?:^|\\s)[$#%]?[-+]?[0-9]+(?:\\.[0-9]*e-?[0-9]+|\\.?[0-9a-fA-F]*)(?=\\s|$)'},
{ token: 'constant.character.forth',
regex: '(?:^|\\s)(?:[&^]\\S|(?:"|\')\\S(?:"|\'))(?=\\s|$)'}],
'#forth':
'#forth':
[ { include: '#constant' },
{ include: '#comment' },
{ include: '#string' },
@ -54,22 +54,22 @@ var ForthHighlightRules = function() {
{ include: '#variable' },
{ include: '#storage' },
{ include: '#word-def' } ],
'#storage':
'#storage':
[ { token: 'storage.type.forth',
regex: '(?:^|\\s)(?:2CONSTANT|2VARIABLE|ALIAS|CONSTANT|CREATE-INTERPRET/COMPILE[:]?|CREATE|DEFER|FCONSTANT|FIELD|FVARIABLE|USER|VALUE|VARIABLE|VOCABULARY)(?=\\s|$)',
caseInsensitive: true}],
'#string':
'#string':
[ { token: 'string.quoted.double.forth',
regex: '(ABORT" |BREAK" |\\." |C" |0"|S\\\\?" )([^"]+")',
caseInsensitive: true},
{ token: 'string.unquoted.forth',
regex: '(?:INCLUDE|NEEDS|REQUIRE|USE)[ ]\\S+(?=\\s|$)',
caseInsensitive: true}],
'#variable':
'#variable':
[ { token: 'variable.language.forth',
regex: '\\b(?:I|J)\\b',
caseInsensitive: true } ],
'#word':
'#word':
[ { token: 'keyword.control.immediate.forth',
regex: '(?:^|\\s)\\[(?:\\?DO|\\+LOOP|AGAIN|BEGIN|DEFINED|DO|ELSE|ENDIF|FOR|IF|IFDEF|IFUNDEF|LOOP|NEXT|REPEAT|THEN|UNTIL|WHILE)\\](?=\\s|$)',
caseInsensitive: true},
@ -88,15 +88,15 @@ var ForthHighlightRules = function() {
{ token: 'keyword.other.warning.forth',
regex: '(?:^|\\s)(?:~~|BREAK:|BREAK"|DBG)(?=\\s|$)',
caseInsensitive: true}],
'#word-def':
[ { token:
'#word-def':
[ { token:
[ 'keyword.other.compile-only.forth',
'keyword.other.compile-only.forth',
'meta.block.forth',
'entity.name.function.forth' ],
regex: '(:NONAME)|(^:|\\s:)(\\s)(\\S+)(?=\\s|$)',
caseInsensitive: true,
push:
push:
[ { token: 'keyword.other.compile-only.forth',
regex: ';(?:CODE)?',
caseInsensitive: true,
@ -107,17 +107,17 @@ var ForthHighlightRules = function() {
{ include: '#word' },
{ include: '#variable' },
{ include: '#storage' },
{ defaultToken: 'meta.block.forth' } ] } ] }
{ defaultToken: 'meta.block.forth' } ] } ] };
this.normalizeRules();
};
ForthHighlightRules.metaData = { fileTypes: [ 'frt', 'fs', 'ldr' ],
ForthHighlightRules.metaData = { fileTypes: [ 'frt', 'fs', 'ldr', 'fth', '4th' ],
foldingStartMarker: '/\\*\\*|\\{\\s*$',
foldingStopMarker: '\\*\\*/|^\\s*\\}',
keyEquivalent: '^~F',
name: 'Forth',
scopeName: 'source.forth' }
scopeName: 'source.forth' };
oop.inherits(ForthHighlightRules, TextHighlightRules);
@ -146,8 +146,8 @@ oop.inherits(FoldMode, BaseFoldMode);
(function() {
this.foldingStartMarker = /(\{|\[)[^\}\]]*$|^\s*(\/\*)/;
this.foldingStopMarker = /^[^\[\{]*(\}|\])|^[\s\*]*(\*\/)/;
this.foldingStartMarker = /([\{\[\(])[^\}\]\)]*$|^\s*(\/\*)/;
this.foldingStopMarker = /^[^\[\{\(]*([\}\]\)])|^[\s\*]*(\*\/)/;
this.singleLineBlockCommentRe= /^\s*(\/\*).*\*\/\s*$/;
this.tripleStarBlockCommentRe = /^\s*(\/\*\*\*).*\*\/\s*$/;
this.startRegionRe = /^\s*(\/\*|\/\/)#?region\b/;
@ -276,12 +276,13 @@ var FoldMode = require("./folding/cstyle").FoldMode;
var Mode = function() {
this.HighlightRules = ForthHighlightRules;
this.foldingRules = new FoldMode();
this.$behaviour = this.$defaultBehaviour;
};
oop.inherits(Mode, TextMode);
(function() {
this.lineCommentStart = "--";
this.blockComment = {start: "/*", end: "*/"};
this.blockComment = null;
this.$id = "ace/mode/forth";
}).call(Mode.prototype);