Skip to content

Commit

Permalink
Merge pull request #39 from SE-Nitro/master
Browse files Browse the repository at this point in the history
Okay now wrking
  • Loading branch information
TheSecondComing123 authored Apr 23, 2022
2 parents 0a1bb58 + cdc5dc9 commit 5e112f4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
4 changes: 1 addition & 3 deletions element_helpers.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import itertools
from typing import Union, Callable, Iterable
from helper import Rational

Number = Rational # backwards compatibility
from helper import Number


def add(a: Number, b: Number):
Expand Down
7 changes: 4 additions & 3 deletions helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@
from tokenizer import Token, TokenType
from collections import Counter

from element_helpers import addascii

TokenList = Union[Token, list[Token]]
Literals = [TokenType.NUMBER, TokenType.STRING]
Rational = (int, float)
Rational = Union[int, float]
Number = Rational # backwards compatibility

def addascii(a: Number, b: str):
return a + sum(map(ord, b))

def gettypes(*a):
"""
Expand Down

0 comments on commit 5e112f4

Please sign in to comment.