workspaced.com.importer
-
Declaration
voidstart();Initializes the import parser. Call with
{"cmd": "load", "components": ["importer"]} -
Declaration
voidstop();Has no purpose right now.
-
Declaration
ImportInfo[]get(stringcode, intpos);Returns all imports available at some
codeposition.Call With:
{"subcmd": "get"} -
Declaration
ImportModificationadd(stringimportName, stringcode, intpos, boolinsertOutermost= true);Returns a list of
codepatches for adding an import. IfisinsertOutermostfalse, the import will get added to the innermost block.Call With:
{"subcmd": "add"} -
Declaration
structImportModification;Information about how to add an import
-
Declaration
stringrename;Set if there was already an import which was renamed. (for example import io = std.stdio; would be "io")
-
Declaration
CodeReplacement[]replacements;Array of
replacementsto add the import to the code
-
-
Declaration
structSelectiveImport; -
Declaration
structImportInfo;Information about one import statement
-
Declaration
string[]name;Parts of the imported module. (std.stdio -> ["std", "stdio"])
-
Declaration
stringrename;Available if the module has been imported renamed
-
Declaration
SelectiveImport[]selectives;Array of selective imports or empty if the entire module has been imported
-