Module aya.base

Interface GenericAyaFile


public interface GenericAyaFile
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static interface 
     
  • Method Summary

    Modifier and Type
    Method
    Description
    default @NotNull org.aya.util.error.SourceFile
     
    default @NotNull Literate
     
    @NotNull org.aya.util.error.SourceFile
     
    default @NotNull kala.collection.immutable.ImmutableSeq<Stmt>
    parseMe(@NotNull GenericAyaParser parser)
    Parse the file content and maybe do some extra processing.
  • Method Details

    • parseMe

      @MustBeInvokedByOverriders @NotNull default @NotNull kala.collection.immutable.ImmutableSeq<Stmt> parseMe(@NotNull @NotNull GenericAyaParser parser) throws IOException
      Parse the file content and maybe do some extra processing. For example, maybe we want to cache the result.
      Throws:
      IOException
    • originalFile

      @NotNull @NotNull org.aya.util.error.SourceFile originalFile() throws IOException
      Returns:
      the original source file, maybe a literate file
      Throws:
      IOException
    • codeFile

      @NotNull default @NotNull org.aya.util.error.SourceFile codeFile() throws IOException
      Returns:
      the valid aya source file
      Throws:
      IOException
      Implementation Note:
      Literate files should override this method to return the extracted code file.
    • literate

      @NotNull default @NotNull Literate literate() throws IOException
      Returns:
      the parsed literate output
      Throws:
      IOException
      Implementation Note:
      This method wraps the file in a code block by default. Literate files should override this method.