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 SimpleSymbolstatic final SimpleSymbolstatic final ImportFromLibrarystatic final SimpleSymbolstatic final SimpleSymbolstatic final SimpleSymbolstatic final SimpleSymbolstatic final ThreadLocal<List<CharSequence>> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringcheckSrfi(String lname, Translator tr) static List<CharSequence> static booleanhandleImport(String implicitSource, String explicitSource, String requestedClass, ScopeExp defs, Translator tr, require.DeclSetMapper mapper) Do the actual work of importing a module.booleanlibraryExists(Object list, Translator tr) Check if library (in r7rs import syntax) exists.rewriteForm(Pair form, Translator tr) voidscanForm(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:
rewriteFormin 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
-