-
-
Notifications
You must be signed in to change notification settings - Fork 376
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multilined Conditional + Order Debug Fix #7431
base: dev/feature
Are you sure you want to change the base?
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
SecConditional
by debugging the conditions within init which is caught in the activeRetainingLogHandler
and is printed in the correct spot via my fix for the order.Also fixes the order of debug messages due to
Section.parse
andhandler.printlog
withinScriptLoader#loadItems
which 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