fixes #432, Nim's syntax highlighting is not weird anymore (#433)

main
andri lim 6 years ago committed by Michael Fix
parent b1371508ed
commit dc58da07af

@ -8,7 +8,9 @@ CodeMirror.defineMode('nimrod', function(conf, parserConf) {
return new RegExp('^((' + words.join(')|(') + '))\\b') return new RegExp('^((' + words.join(')|(') + '))\\b')
} }
var operators = new RegExp('\\=\\+\\-\\*\\/\\<\\>\\@\\$\\~\\&\\%\\|\\!\\?\\^\\:\\\\') var ops = ['=', '+', '-', '*', '/', '<', '>', '@', '$', '~', '&', '%', '|',
'?', '^', ':', '\\', '[', ']', '(', ')', ',', '{', '}', '.\\.', '.']
var operators = new RegExp(ops.map(function(op) { return '\\' + op; }).join('|'))
var identifiers = new RegExp('^[_A-Za-z][_A-Za-z0-9]*') var identifiers = new RegExp('^[_A-Za-z][_A-Za-z0-9]*')
var commonkeywords = [ var commonkeywords = [

Loading…
Cancel
Save