sky-uk / bslint

A linter for the BrightScript language.
BSD 3-Clause "New" or "Revised" License
24 stars 9 forks source link

Fixed parsing error on signed value as function argument #163

Closed alexmakii closed 7 years ago

alexmakii commented 7 years ago

Fixed error with: myvar = myfunc(-1)

DanieleSassoli commented 7 years ago

@zac-robinson @JackIngleton my only concern with this is that if we treat - ID as ID then ID - ID could became ID ID, wich doesn't make much sense... Any thoughts about this?

alexmakii commented 7 years ago

Actually ID - ID rule before - ID - solves that problem.

DanieleSassoli commented 7 years ago

yeah, I've noticed that, I was just wondering if it could be worth moving the - ID rule to a lower order of priority, just to have a clearer separation... but otherwise it's fine. Great job @AlexMakII , very happy you're contributing to the project!

alexmakii commented 7 years ago

Honestly doing fixes for my project (Have ~10 more on the way) I've realized that I'm not always sure about priority/place for new rules. So if I misplaced the rule - I'll be glad to hear advices. Till than I'm relying on tests, logics and correct reduction of my statements )

P.S. Return thanks for this tool ;).

DanieleSassoli commented 7 years ago

So, you haven't misplaced the rule, as it's fine as long as it comes after the ID - ID rule. It's probably good to merge. I'll just give another thought if it's worth moving the rules you added down a level of priority or not, and then eventually merge.