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

Use class FASTJavaTestNodeBuilder as a regular builder #226

Open
RomainDeg opened this issue Feb 28, 2024 · 1 comment
Open

Use class FASTJavaTestNodeBuilder as a regular builder #226

RomainDeg opened this issue Feb 28, 2024 · 1 comment

Comments

@RomainDeg
Copy link
Contributor

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
Copy link
Contributor

Good point.
there are several things to consider here:

  • the model generator now automatically creates a trait TEntityCreator that the model itself uses
    This allows to create entities in a model easily: model newAttribute.
    Maybe what you propose can be added to the model also ?
  • The builder you mention is specific to Java. Can we invent something that would be more generic?
    (based on the Famix/FAST traits)
  • The helper for FAST-Fortran tests is even more elaborated and more expressive/concise (eg. FASTFortranAbstractVisitorTest >> #makeSimpleExpression:)
    Can we come up with some generic DSL that would allow to do the same thing ?

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

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

No branches or pull requests