From 3fac471d51cc255bb348c04625c38bcd5a94ed44 Mon Sep 17 00:00:00 2001 From: catloversg <152669316+catloversg@users.noreply.github.com> Date: Thu, 25 Apr 2024 03:10:20 +0700 Subject: [PATCH] EDITOR: Add "arguments" to the keyword list (#1230) --- src/ScriptEditor/ScriptEditor.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ScriptEditor/ScriptEditor.ts b/src/ScriptEditor/ScriptEditor.ts index 14430675f..bad9617aa 100644 --- a/src/ScriptEditor/ScriptEditor.ts +++ b/src/ScriptEditor/ScriptEditor.ts @@ -45,7 +45,7 @@ export class ScriptEditor { l.language.tokenizer.root.unshift([new RegExp("\\bns\\b"), { token: "ns" }]); for (const symbol of apiKeys) l.language.tokenizer.root.unshift([new RegExp(`\\b${symbol}\\b`), { token: "netscriptfunction" }]); - const otherKeywords = ["let", "const", "var", "function"]; + const otherKeywords = ["let", "const", "var", "function", "arguments"]; const otherKeyvars = ["true", "false", "null", "undefined"]; otherKeywords.forEach((k) => l.language.tokenizer.root.unshift([new RegExp(`\\b${k}\\b`), { token: "otherkeywords" }]),