Feature/parent operator
This PR is to introduce the parent operator '^' (issue #80). The implementation is quite simple: it uses a HashMap to store the parent nodes of every visited Value in the tree. When the parent token is later evaluated, all the parent nodes of the current result vector are retrieved. An alternative approach could have been to introduce a new struct (e.g. struct Node) composed of the Value element reference and its parent node reference. Whilst this latter approach would likely have been performed better it would have been way more destructive for the current code base.
I hope you can find this useful and consider I am Rust beginner, so feel free to make any suggestion in order to improve the PR.
This issue is about to be added to the additional feature. (Note #75)
I'm cleaning up the related code. wait please. :)
Thank you for the feedback @freestrings. If I understand correctly you are considering to enable this feature based on a setting parameter, right? Anyway I've just updated this PR with a fix on the parser, some more tests and a minor improvement for the hasmap use.