Skip to content

Commit

Permalink
Add precedence to String class
Browse files Browse the repository at this point in the history
Ref. #291
  • Loading branch information
treiher committed Aug 25, 2020
1 parent d474b90 commit 15e360b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion rflx/expression.py
Original file line number Diff line number Diff line change
Expand Up @@ -1363,7 +1363,7 @@ def __neg__(self) -> Expr:

@property
def precedence(self) -> Precedence:
raise NotImplementedError
return Precedence.literal

def substituted(
self, func: Callable[[Expr], Expr] = None, mapping: Mapping[Name, Expr] = None
Expand Down
1 change: 1 addition & 0 deletions tests/test_expression.py
Original file line number Diff line number Diff line change
Expand Up @@ -1591,6 +1591,7 @@ def test_expr_str() -> None:
3))"""
),
)
assert str(Equal(String("S"), Variable("X"))) == '"S" = X'


def test_call_str() -> None:
Expand Down

0 comments on commit 15e360b

Please sign in to comment.