moosetechnology / FAST-JAVA

Represent the Java AST with Famix
https://modularmoose.org/moose-wiki/Developers/Parsers/FAST-Java.html
MIT License
1 stars 4 forks source link

Use class FASTJavaTestNodeBuilder as a regular builder #226

Open RomainDeg opened 9 months ago

RomainDeg commented 9 months ago

The test class for the FASTJavaExportVisitor uses a builder to create FAST nodes easily, as they are used in every test case. This builder now can be used to create many types of nodes, and it can be used to create simple nodes or more complex ones, composed with simple nodes created from the same builder.

Moving it to the tools package and renaming it would allow it to gain some visibility, and users who want to use FAST to transform or generate code could gain a lot from using it.

Before issue #225, maybe we should consider adding it to the tools package?

NicolasAnquetil commented 9 months ago

Good point. there are several things to consider here:

There is definitely opportunities for improvement here, and especially for FAST, having a nice DSL to build sub-trees would be very useful