1
0
forked from VimPlug/jedi

start using precedences, working good with only a few test fails

This commit is contained in:
Dave Halter
2014-03-09 02:10:59 +01:00
parent 48dd8f9cb0
commit 61fa9b7fb4
3 changed files with 22 additions and 4 deletions
+5 -1
View File
@@ -73,7 +73,7 @@ class Precedence(object):
def create_precedence(expression_list):
iterator = PushBackIterator(expression_list)
iterator = PushBackIterator(iter(expression_list))
return _check_operator(iterator)
@@ -149,3 +149,7 @@ def _check_operator(iterator, priority=PythonGrammar.LOWEST_PRIORITY):
else:
left = Precedence(left, str(operator), right)
return left
def calculate(left, operator, right):
return left + right