1
0
mirror of https://github.com/sehugg/8bitworkshop.git synced 2024-11-21 23:30:58 +00:00
Steven Hugg 2019-11-11 18:00:58 -06:00
parent eabcd5e8b0
commit 92f246edd0
2 changed files with 5 additions and 5 deletions

View File

@ -22,8 +22,8 @@ CodeMirror.defineMode('6502', function(_config, parserConfig) {
'include','seg','dc','ds','dv','hex','err','org','rorg','echo','rend',
'align','subroutine','equ','eqm','set','mac','endm','mexit','ifconst',
'ifnconst','if','else','endif','eif','repeat','repend'];
var directives = {};
directives_list.forEach(function(s) { directives[s] = 'keyword'; });
var directives = new Map();
directives_list.forEach(function(s) { directives.set(s, 'keyword'); });
var opcodes = /^[a-z][a-z][a-z]\b/i;
var numbers = /^([\da-f]+h|[0-7]+o|[01]+b|\d+d?)\b/i;
@ -47,7 +47,7 @@ CodeMirror.defineMode('6502', function(_config, parserConfig) {
if (stream.eatWhile(/\w/)) {
w = stream.current();
var cur = w.toLowerCase();
var style = directives[cur];
var style = directives.get(cur);
if (style)
return style;

View File

@ -43,7 +43,7 @@ CodeMirror.defineMode('bataribasic', function(_config, parserConfig) {
"cyclescore","cycles","legacy"
];
var directives = {};
directives_list.forEach(function(s) { directives[s] = 'keyword'; });
directives_list.forEach(function(s) { directives.set(s, 'keyword'); });
var numbers = /^([$][0-9a-f]+|[%][01]+|[0-9.]+)/i;
@ -70,7 +70,7 @@ CodeMirror.defineMode('bataribasic', function(_config, parserConfig) {
if (stream.eatWhile(/[$%A-Z0-9]/i)) {
w = stream.current();
var cur = w.toLowerCase();
var style = directives[cur];
var style = directives.get(cur);
if (cur == 'rem') {
stream.eatWhile(/./);
return 'comment';