Package kawa.standard
Class require
- java.lang.Object
-
- kawa.lang.Syntax
-
- kawa.standard.require
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
require.DeclSetMapper
-
Constructor Summary
Constructors Constructor Description require()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Object
find(String typeName)
static boolean
importDefinitions(String className, ModuleInfo info, require.DeclSetMapper mapper, Translator.FormStack forms, ScopeExp defs, Compilation tr)
Import a module with a known source path.static ModuleInfo
lookupModuleFromSourcePath(String sourceName, ScopeExp defs)
static String
mapFeature(String featureName)
Expression
rewriteForm(Pair form, Translator tr)
boolean
scanForDefinitions(Pair st, ScopeExp defs, Translator tr)
Check if a statement is a definition, for initial pass.
-
-
-
Field Detail
-
require
public static final require require
-
-
Method Detail
-
scanForDefinitions
public boolean scanForDefinitions(Pair st, ScopeExp defs, Translator tr)
Description copied from class:Syntax
Check if a statement is a definition, for initial pass. Semi-deprecated - should convert calls to use scanForm.- Overrides:
scanForDefinitions
in classSyntax
- Parameters:
st
- the statement to checkdefs
- where to add Declarations for found definitionstr
- the compilation state- Returns:
- true on success
-
lookupModuleFromSourcePath
public static ModuleInfo lookupModuleFromSourcePath(String sourceName, ScopeExp defs)
-
importDefinitions
public static boolean importDefinitions(String className, ModuleInfo info, require.DeclSetMapper mapper, Translator.FormStack forms, ScopeExp defs, Compilation tr)
Import a module with a known source path.- Parameters:
className
- Optional fully-qualified name of module's class, or null if unknown.
-
rewriteForm
public Expression rewriteForm(Pair form, Translator tr)
- Overrides:
rewriteForm
in classSyntax
-
-