Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions hm_gerber_tool/am_read.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,7 @@ def empty():
equation_left_side = n
else:
instructions.append((OpCode.LOAD, n))
unary_minus_allowed = False

elif c == Token.EQUALS:
found_equation_left_side = True
Expand All @@ -206,6 +207,7 @@ def empty():
# decimal or integer disambiguation
if scanner.peek() not in '.' or scanner.peek() == Token.EOF:
instructions.append((OpCode.PUSH, 0))
unary_minus_allowed = False

elif c in "123456789.":
scanner.ungetc()
Expand All @@ -217,6 +219,7 @@ def empty():
unary_minus = False
n *= -1
instructions.append((OpCode.PUSH, n))
unary_minus_allowed = False
else:
print(' Scanner.read_macro() whitespace or unknown char: {}'.format(c))
# whitespace or unknown char
Expand Down