From fb86c2b34ed439258a42241aaabd8be6a467b6d8 Mon Sep 17 00:00:00 2001 From: Pieter12345 Date: Fri, 13 Jan 2023 03:44:03 +0100 Subject: [PATCH] Fix node modifier movement running on wrong node --- src/main/java/com/laytonsmith/core/MethodScriptCompiler.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/laytonsmith/core/MethodScriptCompiler.java b/src/main/java/com/laytonsmith/core/MethodScriptCompiler.java index 8b1b63964..a9fec423d 100644 --- a/src/main/java/com/laytonsmith/core/MethodScriptCompiler.java +++ b/src/main/java/com/laytonsmith/core/MethodScriptCompiler.java @@ -1917,8 +1917,8 @@ public static ParseTree compile(TokenStream stream, Environment environment, processLateKeywords(tree, environment, compilerErrors); checkLinearComponents(tree, environment, compilerErrors); postParseRewrite(rootNode, environment, envs, compilerErrors, true); // Pass rootNode since this might rewrite 'tree'. - moveNodeModifiersOffSyntheticNodes(tree); tree = rootNode.getChildAt(0); + moveNodeModifiersOffSyntheticNodes(tree); staticAnalysis.analyze(tree, environment, envs, compilerErrors); optimize(tree, environment, envs, procs, compilerErrors); link(tree, compilerErrors);