Rodrigo Bonifacio
Rodrigo Bonifacio

Reputation: 262

Understanding the Rascal support for Java

Is it possible to parse Java files that are external to the eclipse environment? I have only realised operations related to obtaining an AST(s) from Eclipse file (or projects).

Does the current version of Rascal support Java 8?

Upvotes: 2

Views: 183

Answers (1)

Jurgen Vinju
Jurgen Vinju

Reputation: 6696

Yes to the first question:

  • you could use lang::java::m3::Core::createM3FromDirectory, or read its definition and make your own version.
  • this code uses setEnvironmentOptions to the JDT's Java compiler for controlling the classpath and the sourcepath of the compiler.
  • there is no dependency on Eclipse as a whole

To the second question:

  • No: the current stable release is pre Java 8
  • Yes: the current unstable release should work for Java 8. There are no specific tests for this yet, so you may be in for some early adopter surprises.

Upvotes: 2

Related Questions