odin-lang / Odin

Odin Programming Language
https://odin-lang.org
BSD 3-Clause "New" or "Revised" License
6.64k stars 583 forks source link

Fix `core:odin/parser` not parsing `label: #reverse` #3722

Closed Feoramund closed 3 months ago

Feoramund commented 3 months ago

I had a look at the AST with ast.inspect using print statements to make sure the loop is parsed as a reverse loop on the right line and column, tried something like label: #force_inline to make sure it still erred out, and I think it's working properly - as in no unexpected errors, but I haven't a good way to visualize and verify that the AST is in a precisely correct construction, just as an advisory.

Fixes #3715

EDIT: Well, that's unfortunate. I didn't run tests locally. I suppose it was too good to be true to be so easy to fix.

Kelimion commented 3 months ago

How coincidental. @gingerBill mentioned wanting to fix that on the Discord last night, to which you're most welcome, of course.

image

Kelimion commented 3 months ago

but I haven't a good way to visualize and verify that the AST is in a precisely correct construction, just as an advisory.

I'll leave this one for Bill. I'm not familiar enough with the AST to be sure either.

Feoramund commented 3 months ago

All tests are passing now. At the very least, it's parsing the demo.

gingerBill commented 3 months ago

I have improved this in both the C++ side and Odin side in 1945218f6