Skip to content

Commit

Permalink
Fixed precedence of operators.
Browse files Browse the repository at this point in the history
Closes #32.
  • Loading branch information
jerrymakesjelly committed May 13, 2019
1 parent 4b196ba commit 67a89f0
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
4 changes: 0 additions & 4 deletions .gitignore
Expand Up @@ -107,7 +107,3 @@ venv.bak/
.vscode

.pytest_cache/

# python yacc file
parser.out
parsetab.py
4 changes: 4 additions & 0 deletions autoremovetorrents/conditionparser.py
Expand Up @@ -28,6 +28,10 @@ class ConditionParser(object):

tokens = ConditionLexer.tokens

precedence = (
('left', 'AND', 'OR'),
)

def p_statement(self, t):
'statement : expression'
self.remove = t[1]
Expand Down
@@ -0,0 +1,4 @@
test:
remove: seeding_time > 60000 or ratio > 3 and create_time > 1400000
remove:
- Torrent - 4

0 comments on commit 67a89f0

Please sign in to comment.