yunruse / Noether

Just another units package
MIT License
9 stars 0 forks source link

Unary minus not bound in CLI #66

Closed yunruse closed 11 months ago

yunruse commented 11 months ago

Python 3.11.1 noether==1.0.1

Steps

$ python -m noether -- -10degC    
-283.15 K  # temperature
$ python -m noether -- 'degC(-10)'
263.15 K  # temperature

The former is being treat as -degC(10) by the lexer.

Expected behaviour

The - should be bound more tightly in the lexer such that the above two commands are processed the same way.