Package kawa.standard

Class ImportFromLibrary

java.lang.Object
kawa.lang.Syntax
kawa.standard.ImportFromLibrary
All Implemented Interfaces:
gnu.kawa.format.Printable, Named

public class ImportFromLibrary extends Syntax
Implement R6RS import form. This actually only implements simplified import; we assumes it has been simplified by import macro defined in syntax.scm.
  • Field Details

  • Constructor Details

    • ImportFromLibrary

      public ImportFromLibrary()
  • Method Details

    • scanForm

      public void scanForm(Pair st, ScopeExp defs, Translator tr)
      Overrides:
      scanForm in class Syntax
    • checkSrfi

      public static String checkSrfi(String lname, Translator tr)
    • handleImport

      public static boolean handleImport(String implicitSource, String explicitSource, String requestedClass, ScopeExp defs, Translator tr, require.DeclSetMapper mapper)
      Do the actual work of importing a module.
      Parameters:
      implicitSource - Source name inferred from library name, with '/' as separator. Does not include a file extension.
      explicitSource - If non-null, an exlicitly specified source file name.
    • rewriteForm

      public Expression rewriteForm(Pair form, Translator tr)
      Overrides:
      rewriteForm in class Syntax
    • libraryExists

      public boolean libraryExists(Object list, Translator tr)
      Check if library (in r7rs import syntax) exists.
      Returns:
      if library exists: class name of (existing) library class, or the special BUILTIN value; otherwise null.
    • getImportSearchPath

      public static List<CharSequence> getImportSearchPath()