Adds a function to the namespace. Path is the qualified function "path" (e.g., openage::test::foo) has the path ["openage", "test", "foo"]. Descends recursively, creating subnamespaces as required.
(self, path)
| 20 | self.functions = [] |
| 21 | |
| 22 | def add_functionname(self, path): |
| 23 | """ |
| 24 | Adds a function to the namespace. |
| 25 | |
| 26 | Path is the qualified function "path" (e.g., openage::test::foo) |
| 27 | has the path ["openage", "test", "foo"]. |
| 28 | |
| 29 | Descends recursively, creating subnamespaces as required. |
| 30 | """ |
| 31 | if len(path) == 1: |
| 32 | self.functions.append(path[0]) |
| 33 | else: |
| 34 | subnamespace = self.namespaces[path[0]] |
| 35 | subnamespace.add_functionname(path[1:]) |
| 36 | |
| 37 | def gen_prototypes(self): |
| 38 | """ |
no test coverage detected