Package kawa.standard
Class ImportFromLibrary
java.lang.Object
kawa.lang.Syntax
kawa.standard.ImportFromLibrary
- All Implemented Interfaces:
gnu.kawa.format.Printable
,Named
Implement R6RS import form.
This actually only implements simplified import;
we assumes it has been simplified by import macro defined in syntax.scm.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic String[]
static final SimpleSymbol
static final SimpleSymbol
static final ImportFromLibrary
static final SimpleSymbol
static final SimpleSymbol
static final SimpleSymbol
static final SimpleSymbol
static final ThreadLocal
<List<CharSequence>> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic String
checkSrfi
(String lname, Translator tr) static List
<CharSequence> static boolean
handleImport
(String implicitSource, String explicitSource, String requestedClass, ScopeExp defs, Translator tr, require.DeclSetMapper mapper) Do the actual work of importing a module.boolean
libraryExists
(Object list, Translator tr) Check if library (in r7rs import syntax) exists.rewriteForm
(Pair form, Translator tr) void
scanForm
(Pair st, ScopeExp defs, Translator tr)
-
Field Details
-
instance
-
classPrefixPath
-
searchPath
-
classSymbol
-
exceptSymbol
-
librarySymbol
-
onlySymbol
-
prefixSymbol
-
renameSymbol
-
-
Constructor Details
-
ImportFromLibrary
public ImportFromLibrary()
-
-
Method Details
-
scanForm
-
checkSrfi
-
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
- Overrides:
rewriteForm
in classSyntax
-
libraryExists
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
-