refactor-error-handling #12

Merged
laentropia merged 11 commits from refactor-error-handling into main 2026-05-13 19:05:55 -06:00
Owner

Reworked everything to work as expected, jus evaluator needs error handlig wich is a bit crazy given that that was the porpuse of this rework but it ended up being a rework of everything.

the necessary testing and better handlig of errors as output will be taken into account int the further testing issue, (i just want to be done for now)

Reworked everything to work as expected, jus evaluator needs error handlig wich is a bit crazy given that that was the porpuse of this rework but it ended up being a rework of everything. the necessary testing and better handlig of errors as output will be taken into account int the further testing issue, (i just want to be done for now)
laentropia added this to the First working version of calculator milestone 2026-05-13 19:05:23 -06:00
laentropia self-assigned this 2026-05-13 19:05:23 -06:00
laentropia added 11 commits 2026-05-13 19:05:24 -06:00
So, total refactor, now we serious. I feel ASTNode was feeling very
bloated so we need to rewrite and adapt everything, by now lets get the
lexer working again, is already well written for me at least.
Now its fine, the code i find it clear if one just sits down to read it
for a moment, next is the parser that REALLY needs reworking and a few
helper structs.
So just added node back but now clearly separated by tokens and nodes of
the AST as it should be, now real rework the mess that is the parser
DAMN, it wasn't that difficult, just bothers me a bit the part that
checks if both lbp and rbp of the infix are valid, like i do validation
twice but is fine i guess, maybe using an else?, i'll see if i change
it, for now i need to change the evaluator
SO, i forgot to implement nud and led correctly and the parser cant tell
apart from - as unary and - as binary (+ as well), i need to correct
that, move Node * to TreeResult so to use NodeResult with nud and led
I think i should instead have a nud and led function i guess, may do
that next
So now nud and led do what they were supposed to do i guess, now i
thinks is just adjusting infix and postfix and all bd funcions to act on
operator instead.
necessary for cleannes
Is nicer this way, also made it more beautiful to look at and therefor
to understand.
laentropia added this to the Calculator project 2026-05-13 19:05:24 -06:00
laentropia merged commit 9ea1da549f into main 2026-05-13 19:05:55 -06:00
laentropia deleted branch refactor-error-handling 2026-05-13 19:05:55 -06:00
laentropia moved this to Done in Calculator on 2026-05-13 19:07:37 -06:00
Sign in to join this conversation.