Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
libsepol/cil: Create functions to write the CIL AST
The function cil_print_tree() has existed in cil_tree.c since the beginning of the development of CIL and secilc. Unfortunately, it used cil_log() at log level CIL_INFO to print out the AST and has suffered greatly from bit rot. Move the functions to write the CIL AST to cil_write_ast.c, update the functions, and write the AST to the FILE pointer passed in as an argument. The function cil_write_ast() supports writing the CIL AST at three different phases of the compiling a CIL policy. After parsing has been done and the parse tree has been created, after the CIL AST has been built, and after the CIL AST has been resolved. Signed-off-by: James Carter <jwcart2@gmail.com>
- Loading branch information