java.lang.Object
org.aya.cli.interactive.ReplCompiler
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal @NotNull kala.collection.mutable.MutableList<org.aya.resolve.ResolveInfo> final @NotNull kala.collection.immutable.ImmutableSeq<Path> final @NotNull org.aya.util.reporter.CountingReporter -
Constructor Summary
ConstructorsConstructorDescriptionReplCompiler(@NotNull kala.collection.immutable.ImmutableSeq<Path> modulePaths, @NotNull org.aya.util.reporter.Reporter delegateReporter, @Nullable org.aya.util.error.SourceFileLocator locator) -
Method Summary
Modifier and TypeMethodDescription@NotNull kala.control.Either<kala.collection.immutable.ImmutableSeq<org.aya.syntax.core.def.TyckDef>, org.aya.syntax.core.term.Term> compileToContext(@NotNull String text, @NotNull org.aya.syntax.literate.CodeOptions.NormalizeMode normalizeMode) @NotNull kala.control.Either<kala.collection.immutable.ImmutableSeq<org.aya.syntax.core.def.TyckDef>, org.aya.syntax.core.term.Term> compileToContext(@NotNull kala.function.CheckedFunction<org.aya.producer.AyaParserImpl, kala.control.Either<kala.collection.immutable.ImmutableSeq<org.aya.syntax.concrete.stmt.Stmt>, org.aya.util.error.WithPos<org.aya.syntax.concrete.Expr>>, IOException> parsing, @NotNull org.aya.syntax.literate.CodeOptions.NormalizeMode normalizeMode) Copied and adapted.@Nullable org.aya.syntax.core.term.TermcomputeType(@NotNull String text, org.aya.syntax.literate.CodeOptions.NormalizeMode mode) @NotNull ReplContext@NotNull org.aya.primitive.ShapeFactoryvoidvoidloadToContext(@NotNull Path file) @Nullable org.aya.syntax.ref.AnyVarparseToAnyVar(@NotNull String text)
-
Field Details
-
reporter
@NotNull public final @NotNull org.aya.util.reporter.CountingReporter reporter -
modulePaths
-
imports
@NotNull public final @NotNull kala.collection.mutable.MutableList<org.aya.resolve.ResolveInfo> imports
-
-
Constructor Details
-
ReplCompiler
public ReplCompiler(@NotNull @NotNull kala.collection.immutable.ImmutableSeq<Path> modulePaths, @NotNull @NotNull org.aya.util.reporter.Reporter delegateReporter, @Nullable @Nullable org.aya.util.error.SourceFileLocator locator)
-
-
Method Details
-
loadToContext
- Throws:
IOException
-
compileToContext
@NotNull public @NotNull kala.control.Either<kala.collection.immutable.ImmutableSeq<org.aya.syntax.core.def.TyckDef>,org.aya.syntax.core.term.Term> compileToContext(@NotNull @NotNull String text, @NotNull @NotNull org.aya.syntax.literate.CodeOptions.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.syntax.core.def.TyckDef>,org.aya.syntax.core.term.Term> compileToContext(@NotNull @NotNull kala.function.CheckedFunction<org.aya.producer.AyaParserImpl, kala.control.Either<kala.collection.immutable.ImmutableSeq<org.aya.syntax.concrete.stmt.Stmt>, org.aya.util.error.WithPos<org.aya.syntax.concrete.Expr>>, IOException> parsing, @NotNull @NotNull org.aya.syntax.literate.CodeOptions.NormalizeMode normalizeMode) Copied and adapted.- See Also:
-
parseToAnyVar
-
computeType
@Nullable public @Nullable org.aya.syntax.core.term.Term computeType(@NotNull @NotNull String text, org.aya.syntax.literate.CodeOptions.NormalizeMode mode) -
getContext
-
getShapeFactory
@NotNull public @NotNull org.aya.primitive.ShapeFactory getShapeFactory() -
loadPreludeIfPossible
public void loadPreludeIfPossible()
-