mirror of
https://github.com/unisonweb/unison.git
synced 2024-09-11 10:35:57 +03:00
Improve comments
This commit is contained in:
parent
8736c4ab49
commit
b92dede21a
@ -1072,10 +1072,8 @@ data InfixParse v
|
||||
-- 2. Starting at the leftmost operator subexpression, see if the next operator
|
||||
-- has higher precedence. If so, rotate the expression to the right.
|
||||
-- e.g. in `a + b * c`, we first parse `(a + b) * c` then rotate to `a + (b * c)`.
|
||||
-- 3. Perform the algorithm on the right-hand side if necessary.
|
||||
-- e.g. in `a + b + c * d`, we have `(a + (b + c)) * d` and `* d` is the next
|
||||
-- operator to consider. We rotate to `(a + ((b + c) * d))` in step 2.
|
||||
-- Step 3 is to rotate the subexpression `(b + c) * d` to be `b + (c * d)`.
|
||||
-- 3. Perform the algorithm on the right-hand side if necessary, as `b` might be
|
||||
-- an infix expression with lower precedence than `*`.
|
||||
-- 4. Proceed to the next operator to the right in the original expression and
|
||||
-- repeat steps 2-3 until we reach the end.
|
||||
infixAppOrBooleanOp :: forall m v. (Monad m, Var v) => TermP v m
|
||||
|
Loading…
Reference in New Issue
Block a user