hoaproject / Compiler

The Hoa\Compiler library.
https://hoa-project.net/
453 stars 47 forks source link

Remove $nodeId from Token rule definition. #86

Open SerafimArts opened 6 years ago

SerafimArts commented 6 years ago

The third argument to the Token rule is not needed and is not required at runtime or for some other things. We can get rid of it.

new Token($id, $name, $nodeId, $unificationId, $kept);
//                    ^^^^^^^ - excess
flip111 commented 5 years ago

I read the code, and right now, I found no useful case where the $nodeId is used in the constructor. It is always set to null. I guess we can remove it!

https://github.com/hoaproject/Compiler/issues/85#issuecomment-403390651

Should be easy to fix this. Suggest adding issues to

https://up-for-grabs.net/#/

https://github.com/MunGell/awesome-for-beginners#php

https://www.firsttimersonly.com/