cedar_policy_core::parser

Module cst_to_ast

Source
Expand description

Step two: convert CST to package AST Conversions from CST to AST

This module contains functions to convert Nodes containing CST items into AST items. It works with the parser CST output, where all nodes are optional.

An important goal of the transformation is to provide as many errors as possible to expedite development cycles. To this end, many of the functions in this file will continue processing the input, even after an error has been detected. To combine errors before returning a result, we use a flatten_tuple_N helper function.