Skip to content
Snippets Groups Projects
Commit bc1e97f1 authored by Jon Malmaud's avatar Jon Malmaud Committed by Marijn Haverbeke
Browse files

[julia mode] add single-precision literals

parent dda5ed52
No related branches found
No related tags found
No related merge requests found
......@@ -32,6 +32,7 @@
.234
.234im
2.23im
2.3f3
23e2
0x234
......
......@@ -105,7 +105,7 @@ CodeMirror.defineMode("julia", function(_conf, parserConf) {
var imMatcher = RegExp(/^im\b/);
var floatLiteral = false;
// Floats
if (stream.match(/^\d*\.\d+(e[\+\-]?\d+)?/i)) { floatLiteral = true; }
if (stream.match(/^\d*\.\d+([ef][\+\-]?\d+)?/i)) { floatLiteral = true; }
if (stream.match(/^\d+\.\d*/)) { floatLiteral = true; }
if (stream.match(/^\.\d+/)) { floatLiteral = true; }
if (floatLiteral) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment