Unit not cleared during operation

Create issue
Issue #615 closed
Pol Welter created an issue

Try this (assuming you have foot defined)`:

a = meter->foot            ? Don't even think about adding parentheses here. That's another issue.
= 3.28083989501312335958 foot

= 3.28083989501312335958 foot

Comments (8)

  1. Tey'

    You might want to have a look at my (out of sync) parser branch which is an attempt to implement @thadrien suggestion to carry the original text with the token. The problem does not occur with the changes in that branch.

    On a probably related note: (10 meter -> meter) gives 10 meter) (with extra parenthesis).

    Edit: okay, seeing your fix, it's probably not related in the end.

  2. Pol Welter reporter

    I bet the problem was introduced with my recent number type refactor. It's fixed now ^^

    The parentheses thing is unrelated. Your parser refactor should deal with that one ;)

  3. Hadrien Theveneau

    @Teyut: I like the way you implement my idea. I tried to implement it by attaching the text to the token value, in the stack containing the values, but it was not successful because I also needed information in the references stack, so I would have needed to make the same change also for the reference stack. So, I'll continue on your approach.

  4. Tey'

    @thadrien sorry, didn't realize you were working on it already. TBH I didn't think your idea could be implemented easily, so I gave it a try while waiting for my plane, and it appeared I was wrong :) I'm not sure there is much more changes to add, but anyway, we should probably discuss that in issue #589 instead of here.

  5. Log in to comment