list := []string{"a"}
label: #reverse for a in list {
fmt.println(a)
}
pkg, ok := parser.collect_package(".")
if !ok do panic("Failed to collect package\n")
ok = parser.parse_package(pkg)
if !ok do panic("Failed to parse package\n")
OUTPUT
$ odin run .
a
/odin-bug/main.odin(9:13): expected ';', got for
/odin-bug/main.odin(13:16): expected 2 expressions on the right-hand side, got 1
/odin-bug/main.odin(18:1): expected a statement, got }
Doing
label: #reverse for item in list
will cause errors when usingcore:odin/parser
.Similar issue was raised for the compiler here: https://github.com/odin-lang/Odin/issues/3319 But only the compiler got fixed, not the core package.
CODE
OUTPUT
REPORT