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