fend
fend copied to clipboard
Fix implicit multiplication priority
This results in 1m / 1m being parsed as (1m)/(1m) instead of ((1m)/1)m which is a step towards what I wrote in https://github.com/printfn/fend/issues/76#issuecomment-2433861675.
Notes/todo:
- Tests are failing because for example
1 kgsomehow gets turned intonumber 1000/1000 k-g (= 1000/1000 kilogram^-1) (base 10, auto, simplifiable) - There are probably more
parse_power()calls that should be replaced byparse_implicit_multiplication() 1 % 1mis no longer possible with this. In my opinion that's good, but you may disagree
Any thoughts/feedback/tips @printfn? Do you agree that this change make sense?
Also, what is Expr::Bop?
I haven't had a change to look at the code yet, but in theory this seems like a good change, assuming we can get it to work without too many breakages 😅
Bop is for binary operation/operator.
@printfn Wanna have a look at the code? I'm not really sure how to go forward