diff --git a/CHANGELOG.md b/CHANGELOG.md index cd4dbad..9f8312d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,12 +2,19 @@ ### New Features +- Add `context_user_fields` statement to allow custom context user fields. +- Add `token_user_fields` statement to allow custom token user fields. +- Add `on_token_node` statement to allow custom code when constructing token nodes. +- Add `free_token_node` statement to allow custom code when freeing token nodes. - Add `p_context_delete()`. +- Allow `drop` patterns to execute lexer user code blocks. ### Breaking Changes - Replace `p_context_init()` with `p_context_new()` and `p_context_delete()`. - Renamed `p_free_tree()` to `p_tree_delete()`. +- The `free_token_node` statement now takes a user code block instead of a + function name parameter. ## v3.0.0 diff --git a/UPGRADING.md b/UPGRADING.md index 38ad368..50709c1 100644 --- a/UPGRADING.md +++ b/UPGRADING.md @@ -9,6 +9,8 @@ - Add a call to `p_context_delete()` (for C or C++) after lexing/parsing to reclaim context memory. - Rename `p_free_tree()` calls to `p_tree_delete()`. +- Change `free_token_node` statement calls from taking a function name argument + to taking a user code block. ## v3.0.0