Lichen

docs/wiki/APIs

1022:582d834d392d
14 months ago Paul Boddie Merged changes from the value-replacement branch. value-replacement-for-wrapper
     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 }}}