I want a pure Go parsing function syntax.Parse(s string) ( ast.Node, error) that turns one glob pattern…
I want a pure Go parsing function syntax.Parse(s string) ( ast.Node, error) that turns one glob pattern…: a task in MiMo-V2.6-RL-harbor-code: MiMo-V2.6-RL Code (Harbor) (Harbor dataset). The parser should preserve character classes and ranges in the AST: syntax.Parse(" az ") should produce a…
The task
The parser should preserve character classes and ranges in the AST: `syntax.Parse("[az]")` should produce a `KindList` node with `ast.List{Chars: "az"}`, while `syntax.Parse("[!a-z]")` should produce a `KindRange` node with `ast.Range{Lo: 'a', Hi: 'z', Not: true}`. Alternatives should become `KindAnyOf` nodes…
Part of FineEnvs/MiMo-V2.6-RL-harbor-code.