Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
libsepol/cil: Use AST to track blocks and optionals when resolving
When resolving the AST, block and optional stacks are used to determine if the current rule being resolved is in a block or an optional. There is no need to do this since the parent node pointers can be used when exiting a block or an optional to determine if resolution is still within a block or an optional. When entering either a block or an optional, update the appropriate tree node pointer. When finished with the last child of a block or optional, set the appropriate pointer to NULL. If a parent of the same kind is found when the parent node pointers are followed back to the root node, then set the pointer to that tree node. Signed-off-by: James Carter <jwcart2@gmail.com>
- Loading branch information
Showing
1 changed file
with
32 additions
and
75 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters