mirror of
https://github.com/gravitational/teleport.git
synced 2026-10-29 17:58:15 +08:00
`lib/utils/typical` is a new library for building predicate parsers based on the examples set by `lib/utils/parse` and `e/lib/loginrule`. The commit updates `lib/utils/parse` to use the `typical` library to implement the two parsers defined here. This removes a lot of code in `ast.go` that was written for each specific function to do type checking and deal with subexpressions. This is all handled by the `typical` library now. My hope is that this will make it much easier to add new functions in the future and to share them with other parsers.