Allowance for weird case modifier with no zero after period
This commit is contained in:
parent
45372cfff3
commit
820d8aa903
1 changed files with 3 additions and 1 deletions
|
|
@ -97,6 +97,9 @@ class Scanner:
|
|||
n = ""
|
||||
while not self.eof() and (self.peek() in string.digits or self.peek() == "."):
|
||||
n += self.getc()
|
||||
# weird case where zero is ommited inthe last modifider, like in ',0.'
|
||||
if n == ".":
|
||||
return 0
|
||||
return float(n)
|
||||
|
||||
def readstr(self, end="*"):
|
||||
|
|
@ -112,7 +115,6 @@ def print_instructions(instructions):
|
|||
|
||||
|
||||
def read_macro(macro):
|
||||
|
||||
instructions = []
|
||||
|
||||
for block in macro.split("*"):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue