Skip to content

Conversation

dveeden
Copy link

@dveeden dveeden commented Mar 3, 2019

The use case:
Be able to use a post-parse plugin that acts on specific functions being called.

This is done by just adding FUNC_ITEM to the list.
However multiple comments seem to indicate that visit function is only called for literals.

The solutions I see are:

  1. Splitting this into two processor functions, one for literals and one for functions. However parse_node_visit_function etc. have generic names, so to make this clean these then have to be renamed to something like pare_node_visit_literal_function etc.
  2. Keep this in one processor, but allow one to get the type of the item, this allows one to filter out FUNC_ITEM and any other item when needed. That's what is in this pull request.

Please let me know if you think this is a good solution or if there is a better or cleaner solution.

dveeden added 2 commits March 3, 2019 15:37
This allows a post-parse plugin to act on function items in addition
to literals.
@mysql-oca-bot
Copy link

Hi, thank you for your contribution. Please confirm this code is submitted under the terms of the OCA (Oracle's Contribution Agreement) you have previously signed by cutting and pasting the following text as a comment:
"I confirm the code being submitted is offered under the terms of the OCA, and that I am authorized to contribute it."
Thanks

@dveeden
Copy link
Author

dveeden commented Mar 4, 2019 via email

@mysql-oca-bot
Copy link

Hi, thank you for your contribution. Your code has been assigned to an internal queue. Please follow
bug http://bugs.mysql.com/bug.php?id=94551 for updates.
Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants