-
Notifications
You must be signed in to change notification settings - Fork 18
Fix for "; comment only lines" #5
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
Conversation
This should fix adafruit#4 but there might be a better way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the fix! I think we'll want this check earlier though.
adafruit_pioasm.py
Outdated
@@ -60,6 +60,8 @@ def assemble(text_program): | |||
assembled = [] | |||
for instruction in instructions: | |||
print(instruction) | |||
if len(instruction) == 0: | |||
continue |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we want this on line 41. The comment shouldn't end up in instructions because it will mess up the label location (line 55).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I don't use JUMP yet in PIO... so I would not notice and I don't have a test case to validate or invalidate the result.
Feel free to fix it another way.
While for most library, it is hard to have regression test because it is hardware, the assembler hardware independent, so it is a perfect target for automated testing with known input and output.
@dglaude Mind testing the version I've added to this PR? |
library should not print
My initial version was failing to produce the expected output when comment when jump.
|
So your version works. (CI fail but that is something else I guess) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Updating https://github.com/adafruit/Adafruit_CircuitPython_CharLCD to 3.3.7 from 3.3.6: > Merge pull request adafruit/Adafruit_CircuitPython_CharLCD#57 from BiffoBear/fix-home-docstring Updating https://github.com/adafruit/Adafruit_CircuitPython_DymoScale to 1.1.2 from 1.1.1: > Merge pull request adafruit/Adafruit_CircuitPython_DymoScale#10 from adafruit/REUSE > Added pre-commit-config file Updating https://github.com/adafruit/Adafruit_CircuitPython_EMC2101 to 1.1.3 from 1.1.2: > Merge pull request adafruit/Adafruit_CircuitPython_EMC2101#4 from MaxBec/hotfix_pwm_freq Updating https://github.com/adafruit/Adafruit_CircuitPython_FocalTouch to 1.2.4 from 1.2.3: > Merge pull request adafruit/Adafruit_CircuitPython_FocalTouch#19 from kmatch98/add_irq Updating https://github.com/adafruit/Adafruit_CircuitPython_PyPortal to 5.1.2 from 5.1.1: > Merge pull request adafruit/Adafruit_CircuitPython_PyPortal#105 from jfurcean/fix_api_docs > Merge pull request adafruit/Adafruit_CircuitPython_PyPortal#104 from adafruit/dherrada-patch-1 Updating https://github.com/adafruit/Adafruit_CircuitPython_RFM69 to 2.1.2 from 2.1.1: > Merge pull request adafruit/Adafruit_CircuitPython_RFM69#35 from BiffoBear/add-timeout-to-op-mode_setter Updating https://github.com/adafruit/Adafruit_CircuitPython_PIOASM to 0.1.4 from 0.1.3: > Merge pull request adafruit/Adafruit_CircuitPython_PIOASM#5 from dglaude/patch-1 Updating https://github.com/adafruit/Adafruit_CircuitPython_ProgressBar to 1.3.6 from 1.3.5: > Merge pull request adafruit/Adafruit_CircuitPython_ProgressBar#24 from adafruit/REUSE > Added pre-commit-config file Updating https://github.com/adafruit/Adafruit_CircuitPython_RTTTL to 2.4.4 from 2.4.3: > Merge pull request adafruit/Adafruit_CircuitPython_RTTTL#23 from adafruit/dherrada-patch-1
This should fix #4 but there might be a better way.