DenialAdams / roland

Roland programming language
https://www.brick.codes/roland
Apache License 2.0
46 stars 0 forks source link

why not match statement? #104

Closed nyzd closed 1 year ago

nyzd commented 1 year ago

Hey, I was reading the lex file in rolandc and I realized that there are too many if statements, from what I've seen we can change that to match the statement easily, or it has a good reason behind it?

example: https://github.com/DenialAdams/roland/blob/733478efa78dfe8e8f9ff73ca6f08d720f9c6a6e/rolandc/src/lex.rs#L735

DenialAdams commented 1 year ago

Hi, thanks for checking out Roland!

No, I don't think there is a good reason for not using match in a couple of places here. That being said, this sort of minor style choice doesn't really bother me :)

Next time I'm working in that code I'll consider changing it!