Making the preproccessor quieter by default (verbose option)#5
Merged
Patronics merged 4 commits intoPatronics:masterfrom Apr 18, 2022
Merged
Making the preproccessor quieter by default (verbose option)#5Patronics merged 4 commits intoPatronics:masterfrom
Patronics merged 4 commits intoPatronics:masterfrom
Conversation
Contributor
Author
|
I also found and hopefully fixed a minor bug where a macro was substituted uncommented out in areas that should be commented out and a macro with no parameters had the first line commented out as there was no new line after the start of macro comment, such as #macro TEST()
sertxd("Hello World", cr, lf)
sertxd("Another line", cr, lf)
#endmacro
; Commented out #define SOMETHING
#ifdef SOMETHING
TEST()
#endifwas preprocessing to '-----PREPROCESSED BY picaxepreprocess.py-----
'----UPDATED AT 05:31PM, December 02, 2021----
'----SAVING AS compiled.bas ----
'---BEGIN test.bas ---
'PARSED MACRO TEST
; Commented out #define SOMETHING
; ; #ifdef SOMETHING [#IF CODE REMOVED]
; 'Start of macro: TEST sertxd("Hello World", cr, lf) <------- Should be on its own line / not have a comment before it
sertxd("Another line", cr, lf) <------ Not commented out
'--END OF MACRO: TEST() [#IF CODE REMOVED]
; #endif
'---END test.bas---
Now it preprocesses to '-----PREPROCESSED BY picaxepreprocess.py-----
'----UPDATED AT 05:30PM, December 02, 2021----
'----SAVING AS compiled.bas ----
'---BEGIN test.bas ---
'PARSED MACRO TEST
; Commented out #define SOMETHING
; ; #ifdef SOMETHING [#IF CODE REMOVED]
; 'Start of macro: TEST
; sertxd("Hello World", cr, lf)
; sertxd("Another line", cr, lf)
; '--END OF MACRO: TEST()
; [#IF CODE REMOVED]
; #endif
'---END test.bas--- |
Owner
|
Thanks, merged! :) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi Patrick,
It has been a while, but I have made the preprocessor a bit quieter by default and added a
--verboseoption to make it print debugging messages again. This was mainly because I was getting a little tired of the amount of scrolling up required to look at previous commands when there are lots of directives in a document.Stuff that used to call
print()and I classified as more of a debugging message than anything else (up for debate) now callspreprocessor_info()that may or may not print anything.The branch this pull request is from should hopefully have just the verbose option changes if you would like to add it.
Kind regards
Jotham