Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support additional ops for Quote transformations. #177

Open
raulraja opened this issue Nov 18, 2019 · 0 comments
Open

Support additional ops for Quote transformations. #177

raulraja opened this issue Nov 18, 2019 · 0 comments
Assignees
Labels
AST-scope AST elements for the quote system documentation Improvements or additions to documentation enhancement New feature or request

Comments

@raulraja
Copy link
Member

raulraja commented Nov 18, 2019

Currently, quote transformations are limited to Transform.replace which replaces a returned node by a list of declarations. There is an additional set of operations that we would like transformation to be used on.

We would like to support further transformations:

Transform Description
replace Replaces selected node by list of new declarations
remove Removes one or n nodes
relocate Places this node elsewhere in the tree
newSources wraps other transforms and outputs their result in other KtFiles
diagnose Returns a list of Diagnostic that the compiler should present to the user
many wraps a list of transforms and when interpreted executes them in order
+ many(this, other)
empty noop
debug wraps a transform and enables tracing thru its a progression over the internals

We should do one PR per transform and ensure these transformations are tested with the quoteOutputMatchescombinators in the testing library. The testing library would need to receive a few additional algebras to verify produced sources in the newSources transform

@raulraja raulraja added AST-scope AST elements for the quote system documentation Improvements or additions to documentation enhancement New feature or request labels Nov 18, 2019
This was referenced Nov 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
AST-scope AST elements for the quote system documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants