Class ExternSourceGenerator
java.lang.Object
org.ek9lang.compiler.common.ExternSourceGenerator
Facade that combines ANTLR parsing with the ExternSourceVisitor to generate
extern representations of EK9 source files.
This is a key component for incremental builds: unchanged modules can be represented
as extern source, avoiding full recompilation.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongenerateExtern(File sourceFile) Parse a .ek9 file and return its extern representation.generateExtern(String filename, InputStream source) Parse from an InputStream and return the extern representation.
-
Constructor Details
-
ExternSourceGenerator
public ExternSourceGenerator()
-
-
Method Details
-
generateExtern
-
generateExtern
Parse from an InputStream and return the extern representation.- Parameters:
filename- The name to use for error reporting.source- The InputStream containing EK9 source code.- Returns:
- Optional containing the extern source text, empty if parsing failed.
-