Skip to content

Converting to Python3 and adding the option to automatically call the compiler once preprocessed.#1

Merged
Patronics merged 10 commits intoPatronics:masterfrom
jgOhYeah:master
Dec 14, 2020
Merged

Converting to Python3 and adding the option to automatically call the compiler once preprocessed.#1
Patronics merged 10 commits intoPatronics:masterfrom
jgOhYeah:master

Conversation

@jgOhYeah
Copy link
Copy Markdown
Contributor

This adds the -u option to call the correct compiler to upload or check syntax afterwards. As part of this, the flags from the compiler are accepted and passed on to it.
As there is a separate compiler file for each picaxe chip, this preprocessor now interprets #com and #picaxe directives to call the correct compiler with the correct port. If not specified in a basic file, the -c and -v options can be used instead.

Most of the code to do with calling the compiler and selecting the PICAXE chip is copied from my initial attempts in this preprocessor.

@Patronics Patronics merged commit 2a538af into Patronics:master Dec 14, 2020
@Patronics
Copy link
Copy Markdown
Owner

I just tested and merged your changes, thanks for the contribution! I also added the -P option to select a path for the compilers, and added a check for it being a valid path, before realizing you'd already added that check. Well, now it checks earlier in the process, so probably good to keep both, you catch could be useful for other compiler issues as well. I also made it so the -u option isn't needed with the -s option for syntax checks, as that was a bit unintuitive to require both.

@jgOhYeah
Copy link
Copy Markdown
Contributor Author

That looks good and useful additions. Thanks for looking at it and adapting it for more universal usability. Apologies for the extra check. It was a finishing touch I thought of later that I tried to sneak in :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants