Proposal: expose the AST for expressions parsed through $parse. #16253
Description
I'm submitting a ...
- bug report
- feature request
- other (Please do not submit support requests here (see above))
Current behavior:
Currently, there seems to be no way to access the AST of expressions parsed through $parse.
Expected / new behavior:
It could be useful to be able to access the AST of parsed expressions in order to avoid building a custom parser to handle advanced use cases in which it is required to work on the expression's AST.
I believe that the format of the current AST is not going to change in the future, so exposing it should not be of concern for possibly breaking changes.
It would be a nice add to have it exposed through the $parse
's return value. The new behavior could be made opt-in, just in case keeping the AST "alive" after parsing and for each expression, affects the memory consumption.
Thank you for your time!
AngularJS version: 1.6.6