From d1eb45ad52352da0455b76faaa86c9f6449daf34 Mon Sep 17 00:00:00 2001
From: Pieter12345
Date: Thu, 1 Feb 2024 03:50:50 +0100
Subject: [PATCH] Re-add accidentally removed conditional
Fixup for previous commit.
---
src/main/java/com/laytonsmith/core/MethodScriptCompiler.java | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/main/java/com/laytonsmith/core/MethodScriptCompiler.java b/src/main/java/com/laytonsmith/core/MethodScriptCompiler.java
index 3ed28d456..401e12bf8 100644
--- a/src/main/java/com/laytonsmith/core/MethodScriptCompiler.java
+++ b/src/main/java/com/laytonsmith/core/MethodScriptCompiler.java
@@ -2945,6 +2945,11 @@ private static void processEarlyKeywords(TokenStream stream, Environment env, Se
int ind = it.nextIndex();
token = it.next();
+ // Some keywords look like function names, we need those too.
+ if(token.type != TType.KEYWORD && token.type != TType.FUNC_NAME) {
+ continue;
+ }
+
EarlyBindingKeyword keyword = KeywordList.getEarlyBindingKeywordByName(token.val());
if(keyword == null) {
continue;