unwrapAst
unwrapAst(
result):AST
unwrapAst returns the AST from a frontend result, throwing when diagnostics are present.
The frontend mirrors cel-go by returning diagnostics rather than throwing, because invalid user expressions are an expected outcome. This helper is the escape hatch for callers whose input is known-good — library internals re-checking an AST they just produced, tests, and literal expressions — so that guarantee is stated at one call site instead of duplicated into a parallel throwing method for every frontend operation.