Skip to content

Commit 949caad

Browse files
code: fix typos, grammar, punctuation
1 parent 5980c7a commit 949caad

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

esp32_ulp/__main__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ def main(fn, cpu):
2020
if sys.argv[1] in ('-c', '--mcpu'):
2121
cpu = sys.argv[2].lower()
2222
if cpu not in ('esp32', 'esp32s2'):
23-
raise ValueError('Invalid cpu')
23+
raise ValueError('Invalid CPU')
2424
filename = sys.argv[3]
2525
main(filename, cpu)
2626

esp32_ulp/assemble.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ def __init__(self, cpu='esp32', symbols=None, bases=None, globals=None):
100100
elif cpu == 'esp32s2':
101101
opcode_module = 'opcodes_s2'
102102
else:
103-
raise ValueError('Invalid cpu')
103+
raise ValueError('Invalid CPU')
104104

105105
relative_import = 1 if '/' in __file__ else 0
106106
self.opcodes = __import__(opcode_module, None, None, [], relative_import)
@@ -111,7 +111,7 @@ def __init__(self, cpu='esp32', symbols=None, bases=None, globals=None):
111111
# regex for parsing assembly lines
112112
# format: [[whitespace]label:][whitespace][opcode[whitespace arg[,arg...]]]
113113
# where [] means optional
114-
# initialised here once, instead of compiling once per line
114+
# initialized here once, instead of compiling once per line
115115
self.line_regex = re.compile(r'^(\s*([a-zA-Z0-9_$.]+):)?\s*((\S*)\s*(.*))$')
116116

117117
def init(self, a_pass):

esp32_ulp/preprocess.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def parse_define_line(self, line):
5555
identifier, value = parts
5656
tmp = identifier.split('(', 1)
5757
if len(tmp) == 2:
58-
# skip parameterised defines (macros)
58+
# skip parameterized defines (macros)
5959
return {}
6060
value = "".join(nocomment.remove_comments(value)).strip()
6161
return {identifier: value}
@@ -68,7 +68,7 @@ def parse_defines(self, content):
6868

6969
def expand_defines(self, line):
7070
found = True
71-
while found: # do as many passed as needed, until nothing was replaced anymore
71+
while found: # do as many passes as needed, until nothing is replaced anymore
7272
found = False
7373
tokens = split_tokens(line)
7474
line = ""
@@ -115,8 +115,8 @@ def expand_rtc_macros(self, line):
115115
if macro_fn is None:
116116
return line
117117

118-
macro_args, _ = macro_args.rsplit(')', 1) # trim away right bracket. safe as comments already stripped
119-
macro_args = macro_args.split(',') # not safe when args contain ',' but we should not have those
118+
macro_args, _ = macro_args.rsplit(')', 1) # trim away the right bracket; safe as comments are already stripped
119+
macro_args = macro_args.split(',') # not safe when args contain ','; we should not have those
120120
macro_args = [x.strip() for x in macro_args]
121121

122122
return macro_fn(*macro_args)

0 commit comments

Comments
 (0)