dimportsort

Undocumented in source.

Members

Classes

ImportIdentifiers
class ImportIdentifiers

Data type for identifiers in an import declaration. import mod : binds, ...;

ImportVisitor
class ImportVisitor

Functions

attributeStringOf
string attributeStringOf(Attribute attr)
Undocumented in source. Be warned that the author may not have intended to support it.
canMerge
bool canMerge(SortedImport a, SortedImport b)

Checks if two sorted imports can be merged into one.

formatSortedImports
string formatSortedImports(SortedImport[] outputs, string indent)

Formats output imports into a string.

isConsective
bool isConsective(Declaration a, Declaration b)

Checks declarations are consective.

sortedImports
SortedImport[] sortedImports(ImportIdentifiers[] idents)

Merges and sorts import identifiers for outputs.

toIdentifiers
ImportIdentifiers[] toIdentifiers(Declaration decl)

Decomposes multi module import decl to a list of single module with binds.

visitImports
ImportVisitor visitImports(string sourceCode, string fileName)
Undocumented in source. Be warned that the author may not have intended to support it.

Structs

SortedImport
struct SortedImport

Data type to store a sorted import declaration.

Meta