Lacia/Autocode
Code tools.
Public
-
convertNotebookToWLT[dir_,targetDir_]
- convert notebooks in the directory to *.wlt test files.-
This function will syntactically import cells of type
"Input"|"Code"|"Output"|"Message"
, then regroup them into{"Input"|"Code","Output","Message"}
, and convert the groups intoVerificationTest
. -
An input cell with more than one outputs will be reported as an error, since there is no syntactical way to separate the input cell. For example,
Code
a b
Out[] = a Out[] = b
-
Option:
"ExcludedFile"->{}
- exclude certain notebooks in the directory.
-
Notice:
-
Currently format definitions cannot be parsed correctly, use the following workaround instead:
Code
ToExpression["Format[expr,format]:=expr1;"]
TODO check the code
NotebookImport[#,_->"HeldExpression"]&
to see howNotebookImport
handlesFormat
. -
TODO Another parser of input cell, controlled by
(*$reformatCode = False;*)
should be deprecated, since it cannot distinguishPower
andSuperscript
.
-
-
-
ASTHierarchy
- return the hierarchical structure of the AST. -
ASTHierarchyPrint
- print the hierarchical structure of the AST.
buildLibrary
- build the library.
-
dependency
- symbol dependency from definitions. -
dependencyGraph
- symbol dependency graph from definitions. -
$dependencyLimit
- the fixed-point limit in dependency*. -
$dependencyExclusion
- the excluded contexts in dependency*.
-
exportArgumentCompletion
- export the argument completion data. -
$argumentFileName
- default name of the argument completion file.
-
exportPublicSymbolUsage
- export the usages of public symbols in the directory. -
$usageFileName
- default name of the usage file.
reportSuspiciousSet
- report suspicious set in the *.wl files in the directory.
reportWLT
- report the unit test in the directory.