Multilined Conditional + Order Debug Fix#7431
Conversation
|
We should look into ways for the condition debug messages to be printed from the syntax classes themselves. The ScriptLoader shouldn't have knowledge of any specific syntax implementations |
That was my original plan, however, when I tried it, adding newlines for each of the condition, obviously did not retain the indentation, and when I had tried (granted I may have done it wrong) but trying You say that it shouldn't have knowledge of what it implements, but I'm not entirely sure what you mean. Because currently it does have knowledge that the |
|
You can probably grab the indentation from the Node object itself. As for "not having knowledge", while the ScriptLoader should understand the concept of sections, statements, etc. (i.e. the syntax types), it should not have knowledge of (or reference) specific implementations of those types (e.g. conditional sections). |
Alrighty, well I'll delete the |
|
@APickledWalrus Since the discussion on discord came to an end without a final verdict. Let me know what approach I should do. |
Description
This PR aims to fix the skipped debugging of embedded multilined conditions such as
SecConditionalby debugging the conditions within init which is caught in the activeRetainingLogHandlerand is printed in the correct spot via my fix for the order.Also fixes the order of debug messages due to
Section.parseandhandler.printlogwithinScriptLoader#loadItemswhich was placing all embedded elements above the debugged line of the parent SectionNode.Example Code:
Before:

After:

Example Code from #7236
Target Minecraft Versions: any
Requirements: none
Related Issues: #7236 , #7237