notalfredo / OpenKittenCAD

A free as in freedom CodeCad app
GNU Lesser General Public License v2.1
6 stars 0 forks source link

[chore] got rid of re assign node #56

Closed notalfredo closed 7 months ago

notalfredo commented 7 months ago

I noticed it when I was checking for shift/reduce errors with bison and noticed there was a shift reduce error. It then showed to me that I had a rule for re assignment something like this

reAssignRule:
tok_ID tok_ASSIGN expr

but I also had the following

binOpRule:
tok_ID tok_ASSIGN expr

The one below seemed like the right choice since it really was just a binary operation happening. Decided to get rid of the top rule and all the logic for it in the semantic file.