Skip to content

Commit

Permalink
Merge pull request #161 from Thunno/fix-endings
Browse files Browse the repository at this point in the history
Fix ending characters
  • Loading branch information
nayakrujul authored Aug 5, 2023
2 parents aac10a5 + f4bb050 commit d71c378
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
Binary file modified src/__pycache__/test_run.cpython-39.pyc
Binary file not shown.
Binary file modified src/thunno2/__pycache__/lexer.cpython-39.pyc
Binary file not shown.
22 changes: 11 additions & 11 deletions src/thunno2/lexer.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ def tokenise(code, expected_end=""):
y = char + x
if y == "µµ":
i, r = tokenise(code[index + 1 :], expected_end=";")
index += i
index += i + 1
ret.append((y, "recursive environment", r))
elif y == "µ£":
ret.append((y, "print each", 0))
Expand Down Expand Up @@ -175,7 +175,7 @@ def tokenise(code, expected_end=""):
)
elif y == "µʋ":
i, r = tokenise(code[index + 1 :], expected_end=";")
index += i
index += i + 1
ret.append((y, "right reduce by", r))
elif y == "µ€":
index += 1
Expand All @@ -193,7 +193,7 @@ def tokenise(code, expected_end=""):
ret.append((y, "reverse stack", 0))
elif y == "µÑ":
i, r = tokenise(code[index + 1 :], expected_end=";")
index += i
index += i + 1
ret.append((y, "adjacent group by", r))
elif y == "µñ":
index += 1
Expand Down Expand Up @@ -571,35 +571,35 @@ def tokenise(code, expected_end=""):
ret.append((char, "print without popping", 0))
elif char == "ı":
i, r = tokenise(code[index + 1 :], expected_end=";")
index += i
index += i + 1
ret.append((char, "map", r))
elif char == "æ":
i, r = tokenise(code[index + 1 :], expected_end=";")
index += i
index += i + 1
ret.append((char, "filter", r))
elif char == "Þ":
i, r = tokenise(code[index + 1 :], expected_end=";")
index += i
index += i + 1
ret.append((char, "sort by", r))
elif char == "Ñ":
i, r = tokenise(code[index + 1 :], expected_end=";")
index += i
index += i + 1
ret.append((char, "group by", r))
elif char == "¥":
i, r = tokenise(code[index + 1 :], expected_end=";")
index += i
index += i + 1
ret.append((char, "fixed point", r))
elif char == "Ƙ":
i, r = tokenise(code[index + 1 :], expected_end=";")
index += i
ret.append((char, "first n integers", r))
elif char == "Ʋ":
i, r = tokenise(code[index + 1 :], expected_end=";")
index += i
index += i + 1
ret.append((char, "cumulative reduce by", r))
elif char == "{":
i, r = tokenise(code[index + 1 :], expected_end="}")
index += i
index += i + 1
ret.append((char, "for loop", r))
elif char == "(":
i, r1 = tokenise(code[index + 1 :], expected_end=";)")
Expand All @@ -614,7 +614,7 @@ def tokenise(code, expected_end=""):
ret.append((char, "while loop", (r1, r2)))
elif char == "⁽":
i, r = tokenise(code[index + 1 :], expected_end="⁾")
index += i
index += i + 1
ret.append((char, "forever loop", r))
elif char == "?":
i, r1 = tokenise(code[index + 1 :], expected_end=":;")
Expand Down

0 comments on commit d71c378

Please sign in to comment.