Class VanCompiler

java.lang.Object
dev.vanengine.core.VanCompiler

public class VanCompiler extends Object

Pipeline: VanParser → VanResolver → render (with VanSignalGen for client JS).

Lifecycle: no init() or close() needed — pure Java, no subprocess.

  • Constructor Details

    • VanCompiler

      public VanCompiler()
  • Method Details

    • setGlobalName

      public void setGlobalName(String globalName)
    • getGlobalName

      public String getGlobalName()
    • compile

      public VanCompiler.CompiledResult compile(Path vanFile, Path basePath) throws IOException
      Compile a .van file, returning cached results when no file in the dependency tree has changed.
      Parameters:
      vanFile - path to the .van entry file
      basePath - base directory for resolving relative imports
      Returns:
      compiled HTML string
      Throws:
      IOException
    • compile

      public VanCompiler.CompiledResult compile(String entryPath, Map<String,String> files)
      Compile with an explicit files map (for classpath resources or in-memory).
    • renderToString

      public String renderToString(String entryPath, Map<String,String> files, String dataJson)
      Render with data — compiles and binds data into final HTML.
    • parseImportPaths

      public static List<String> parseImportPaths(String content)
      Extract component import paths from .van file content.