Skip to content

Commit

Permalink
add support for characters in CodeMirror mode
Browse files Browse the repository at this point in the history
  • Loading branch information
jcubic committed Jan 29, 2024
1 parent 82a201e commit 302daad
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/js/codemirror.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ CodeMirror.defineMode("lips", function () {
function isHexNumber (stream) {
return stream.match(hexMatcher);
}

function processEscapedSequence(stream, options) {
var next, escaped = false;
while ((next = stream.next()) != null) {
Expand Down Expand Up @@ -165,7 +165,9 @@ CodeMirror.defineMode("lips", function () {
state.mode = "symbol";
returnType = SYMBOL;
} else if (ch == '#') {
if (stream.eat("|")) { // Multi-line comment
if (stream.eat(/\\x([0-9a-f]+)/) || stream.eat(/\\./u)) {
returnType = STRING;
} else if (stream.eat("|")) { // Multi-line comment
state.mode = "comment"; // toggle to comment mode
returnType = COMMENT;
} else if (stream.eat(/[tf]/i)) { // #t/#f (atom)
Expand Down

0 comments on commit 302daad

Please sign in to comment.