We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents f227a50 + bfbd002 commit a631797Copy full SHA for a631797
adafruit_pioasm.py
@@ -12,6 +12,9 @@
12
"""
13
14
import array
15
+import re
16
+
17
+splitter = re.compile(r",\s*|\s+(?:,\s*)?").split
18
19
__version__ = "0.0.0-auto.0"
20
__repo__ = "https://github.com/adafruit/Adafruit_CircuitPython_PIOASM.git"
@@ -61,7 +64,7 @@ def assemble(text_program):
61
64
assembled = []
62
65
for instruction in instructions:
63
66
# print(instruction)
- instruction = instruction.split()
67
+ instruction = splitter(instruction.strip())
68
delay = 0
69
if instruction[-1].endswith("]"): # Delay
70
delay = int(instruction[-1].strip("[]"))
0 commit comments