Comparing to pico-8 builtins
This commit is contained in:
@@ -64,6 +64,8 @@ const values = [
|
||||
"null",
|
||||
"true",
|
||||
"undefined",
|
||||
"NaN",
|
||||
"Infinity",
|
||||
];
|
||||
const operator = [
|
||||
"&&",
|
||||
@@ -659,6 +661,9 @@ const draw = () => {
|
||||
const lines = token.value.split("\n");
|
||||
lines.forEach((line, i) => {
|
||||
let color = tokenColors[token.type];
|
||||
if (builtins.includes(token.value)) {
|
||||
color = builtinColor;
|
||||
}
|
||||
if (keywords.includes(token.value)) {
|
||||
color = keywordColor;
|
||||
}
|
||||
@@ -671,9 +676,6 @@ const draw = () => {
|
||||
if (punctuation.includes(token.value)) {
|
||||
color = punctuationColor;
|
||||
}
|
||||
if (builtins.includes(token.value)) {
|
||||
color = builtinColor;
|
||||
}
|
||||
drawText(1+x+cx-scrollX, 1+y+cy-scrollY, line, color);
|
||||
if (i === lines.length-1) {
|
||||
cx += measureText(line)+1;
|
||||
|
||||
Reference in New Issue
Block a user