Lichen

docs/wiki/APIs

945:16ecb996eb96
2021-11-04 Paul Boddie Introduced a dedicated sizevalue union member for __size__ attributes.
     1 = APIs =     2      3 The principal application programming interfaces (APIs) within Lichen are     4 described below.     5      6 == Modules ==     7      8 When [[../Inspection|inspecting]] and [[../Translation|translating]] modules,     9 common abstractions are used so that elements of the program are handled in    10 similar ways. Various useful attributes and methods are provided by the    11 `CommonModule` abstraction for use within `InspectedModule` and    12 `TranslatedModule` methods:    13     14 {{{#!table    15 '''Attribute or Method''' || '''Purpose'''    16 ==    17 `name` || An attribute providing the module name.    18 ==    19 `get_global_path(name)` || A method returning the qualified name of the given    20                         .. global name within the module being processed.    21 ==    22 `get_namespace_path()`  || A method returning the qualified name of the    23                         .. namespace being processed.    24     25  * For modules, this is the module name    26  * For classes, functions and methods, the path incorporates the module name    27    and namespaces leading to the current namespace itself    28 ==    29 `get_object_path(name)` || A method returning the qualified name of the given    30                         .. local name within the namespace being processed.    31 }}}