Package kawa.standard

Class 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.
    • Constructor Detail

      • ImportFromLibrary

        public ImportFromLibrary()
    • Method Detail

      • 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.
      • 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.