Skip to content

Commit

Permalink
Bump CodeMirror
Browse files Browse the repository at this point in the history
  • Loading branch information
evanplaice committed May 10, 2021
1 parent d5b74dc commit fd1f9ef
Show file tree
Hide file tree
Showing 64 changed files with 1,143 additions and 510 deletions.
2 changes: 1 addition & 1 deletion mode/asn.1/asn.1.js
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@
" NetworkAddress BITS BMPString TimeStamp TimeTicks" +
" TruthValue RowStatus DisplayString GeneralString" +
" GraphicString IA5String NumericString" +
" PrintableString SnmpAdminAtring TeletexString" +
" PrintableString SnmpAdminString TeletexString" +
" UTF8String VideotexString VisibleString StringStore" +
" ISO646String T61String UniversalString Unsigned32" +
" Integer32 Gauge Gauge32 Counter Counter32 Counter64"),
Expand Down
20 changes: 10 additions & 10 deletions mode/clike/clike.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,15 +82,15 @@ CodeMirror.defineMode("clike", function(config, parserConfig) {
state.tokenize = tokenString(ch);
return state.tokenize(stream, state);
}
if (isPunctuationChar.test(ch)) {
curPunc = ch;
return null;
}
if (numberStart.test(ch)) {
stream.backUp(1)
if (stream.match(number)) return "number"
stream.next()
}
if (isPunctuationChar.test(ch)) {
curPunc = ch;
return null;
}
if (ch == "/") {
if (stream.eat("*")) {
state.tokenize = tokenComment;
Expand Down Expand Up @@ -350,8 +350,8 @@ CodeMirror.defineMode("clike", function(config, parserConfig) {
function cpp11StringHook(stream, state) {
stream.backUp(1);
// Raw strings.
if (stream.match(/(R|u8R|uR|UR|LR)/)) {
var match = stream.match(/"([^\s\\()]{0,16})\(/);
if (stream.match(/^(?:R|u8R|uR|UR|LR)/)) {
var match = stream.match(/^"([^\s\\()]{0,16})\(/);
if (!match) {
return false;
}
Expand All @@ -360,8 +360,8 @@ CodeMirror.defineMode("clike", function(config, parserConfig) {
return tokenRawString(stream, state);
}
// Unicode strings/chars.
if (stream.match(/(u8|u|U|L)/)) {
if (stream.match(/["']/, /* eat */ false)) {
if (stream.match(/^(?:u8|u|U|L)/)) {
if (stream.match(/^["']/, /* eat */ false)) {
return "string";
}
return false;
Expand Down Expand Up @@ -659,7 +659,7 @@ CodeMirror.defineMode("clike", function(config, parserConfig) {
"file import where by get set abstract enum open inner override private public internal " +
"protected catch finally out final vararg reified dynamic companion constructor init " +
"sealed field property receiver param sparam lateinit data inline noinline tailrec " +
"external annotation crossinline const operator infix suspend actual expect setparam"
"external annotation crossinline const operator infix suspend actual expect setparam value"
),
types: words(
/* package java.lang */
Expand Down Expand Up @@ -749,7 +749,7 @@ CodeMirror.defineMode("clike", function(config, parserConfig) {
"gl_ModelViewMatrix gl_ProjectionMatrix gl_ModelViewProjectionMatrix " +
"gl_TextureMatrix gl_NormalMatrix gl_ModelViewMatrixInverse " +
"gl_ProjectionMatrixInverse gl_ModelViewProjectionMatrixInverse " +
"gl_TexureMatrixTranspose gl_ModelViewMatrixInverseTranspose " +
"gl_TextureMatrixTranspose gl_ModelViewMatrixInverseTranspose " +
"gl_ProjectionMatrixInverseTranspose " +
"gl_ModelViewProjectionMatrixInverseTranspose " +
"gl_TextureMatrixInverseTranspose " +
Expand Down
4 changes: 2 additions & 2 deletions mode/clojure/clojure.js
Original file line number Diff line number Diff line change
Expand Up @@ -160,10 +160,10 @@ CodeMirror.defineMode("clojure", function (options) {
var numberLiteral = /^(?:[+\-]?\d+(?:(?:N|(?:[eE][+\-]?\d+))|(?:\.?\d*(?:M|(?:[eE][+\-]?\d+))?)|\/\d+|[xX][0-9a-fA-F]+|r[0-9a-zA-Z]+)?(?=[\\\[\]\s"#'(),;@^`{}~]|$))/;
var characterLiteral = /^(?:\\(?:backspace|formfeed|newline|return|space|tab|o[0-7]{3}|u[0-9A-Fa-f]{4}|x[0-9A-Fa-f]{4}|.)?(?=[\\\[\]\s"(),;@^`{}~]|$))/;

// simple-namespace := /^[^\\\/\[\]\d\s"#'(),;@^`{}~][^\\\[\]\s"(),;@^`{}~]*/
// simple-namespace := /^[^\\\/\[\]\d\s"#'(),;@^`{}~.][^\\\[\]\s"(),;@^`{}~.\/]*/
// simple-symbol := /^(?:\/|[^\\\/\[\]\d\s"#'(),;@^`{}~][^\\\[\]\s"(),;@^`{}~]*)/
// qualified-symbol := (<simple-namespace>(<.><simple-namespace>)*</>)?<simple-symbol>
var qualifiedSymbol = /^(?:(?:[^\\\/\[\]\d\s"#'(),;@^`{}~][^\\\[\]\s"(),;@^`{}~]*(?:\.[^\\\/\[\]\d\s"#'(),;@^`{}~][^\\\[\]\s"(),;@^`{}~]*)*\/)?(?:\/|[^\\\/\[\]\d\s"#'(),;@^`{}~][^\\\[\]\s"(),;@^`{}~]*)*(?=[\\\[\]\s"(),;@^`{}~]|$))/;
var qualifiedSymbol = /^(?:(?:[^\\\/\[\]\d\s"#'(),;@^`{}~.][^\\\[\]\s"(),;@^`{}~.\/]*(?:\.[^\\\/\[\]\d\s"#'(),;@^`{}~.][^\\\[\]\s"(),;@^`{}~.\/]*)*\/)?(?:\/|[^\\\/\[\]\d\s"#'(),;@^`{}~][^\\\[\]\s"(),;@^`{}~]*)*(?=[\\\[\]\s"(),;@^`{}~]|$))/;

function base(stream, state) {
if (stream.eatSpace() || stream.eat(",")) return ["space", null];
Expand Down
8 changes: 4 additions & 4 deletions mode/crystal/crystal.js
Original file line number Diff line number Diff line change
Expand Up @@ -194,17 +194,17 @@
// Numbers
if (stream.eat("0")) {
if (stream.eat("x")) {
stream.match(/^[0-9a-fA-F]+/);
stream.match(/^[0-9a-fA-F_]+/);
} else if (stream.eat("o")) {
stream.match(/^[0-7]+/);
stream.match(/^[0-7_]+/);
} else if (stream.eat("b")) {
stream.match(/^[01]+/);
stream.match(/^[01_]+/);
}
return "number";
}

if (stream.eat(/^\d/)) {
stream.match(/^\d*(?:\.\d+)?(?:[eE][+-]?\d+)?/);
stream.match(/^[\d_]*(?:\.[\d_]+)?(?:[eE][+-]?\d+)?/);
return "number";
}

Expand Down
Loading

0 comments on commit fd1f9ef

Please sign in to comment.