Module aya.cli.impl

Class ReplCompiler

java.lang.Object
org.aya.cli.interactive.ReplCompiler

public class ReplCompiler extends Object
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    final @NotNull org.aya.util.reporter.CountingReporter
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    ReplCompiler(@NotNull kala.collection.immutable.ImmutableSeq<Path> modulePaths, @NotNull org.aya.util.reporter.Reporter reporter, @Nullable org.aya.util.error.SourceFileLocator locator)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    @Nullable org.aya.core.def.FnDef
    codificationObject(@NotNull String text)
     
    @NotNull kala.control.Either<kala.collection.immutable.ImmutableSeq<org.aya.core.def.GenericDef>,org.aya.core.term.Term>
    compileToContext(@NotNull String text, @NotNull org.aya.generic.util.NormalizeMode normalizeMode)
     
    @NotNull kala.control.Either<kala.collection.immutable.ImmutableSeq<org.aya.core.def.GenericDef>,org.aya.core.term.Term>
    compileToContext(@NotNull kala.function.CheckedFunction<AyaParserImpl,kala.control.Either<kala.collection.immutable.ImmutableSeq<org.aya.concrete.stmt.Stmt>,org.aya.concrete.Expr>,IOException> parsing, @NotNull org.aya.generic.util.NormalizeMode normalizeMode)
    Copied and adapted.
    @Nullable org.aya.core.term.Term
    computeType(@NotNull String text, @NotNull org.aya.generic.util.NormalizeMode normalizeMode)
     
    @NotNull ReplContext
     
    void
    loadToContext(@NotNull Path file)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • reporter

      @NotNull public final @NotNull org.aya.util.reporter.CountingReporter reporter
  • Constructor Details

    • ReplCompiler

      public ReplCompiler(@NotNull @NotNull kala.collection.immutable.ImmutableSeq<Path> modulePaths, @NotNull @NotNull org.aya.util.reporter.Reporter reporter, @Nullable @Nullable org.aya.util.error.SourceFileLocator locator)
  • Method Details

    • loadToContext

      public void loadToContext(@NotNull @NotNull Path file) throws IOException
      Throws:
      IOException
    • compileToContext

      @NotNull public @NotNull kala.control.Either<kala.collection.immutable.ImmutableSeq<org.aya.core.def.GenericDef>,org.aya.core.term.Term> compileToContext(@NotNull @NotNull String text, @NotNull @NotNull org.aya.generic.util.NormalizeMode normalizeMode)
      Parameters:
      text - the text of code to compile, witch might either be a `program` or an `expr`.
    • compileToContext

      @NotNull public @NotNull kala.control.Either<kala.collection.immutable.ImmutableSeq<org.aya.core.def.GenericDef>,org.aya.core.term.Term> compileToContext(@NotNull @NotNull kala.function.CheckedFunction<AyaParserImpl,kala.control.Either<kala.collection.immutable.ImmutableSeq<org.aya.concrete.stmt.Stmt>,org.aya.concrete.Expr>,IOException> parsing, @NotNull @NotNull org.aya.generic.util.NormalizeMode normalizeMode)
      Copied and adapted.
      See Also:
    • computeType

      @Nullable public @Nullable org.aya.core.term.Term computeType(@NotNull @NotNull String text, @NotNull @NotNull org.aya.generic.util.NormalizeMode normalizeMode)
    • codificationObject

      @Nullable public @Nullable org.aya.core.def.FnDef codificationObject(@NotNull @NotNull String text)
    • getContext

      @NotNull public @NotNull ReplContext getContext()