diff options
author | Daniel Kolesa <d.kolesa@osg.samsung.com> | 2018-03-08 23:01:01 +0100 |
---|---|---|
committer | Daniel Kolesa <d.kolesa@osg.samsung.com> | 2018-03-08 23:01:01 +0100 |
commit | f24fa691e7c25ed6779f78affcbfe7310fa85dda (patch) | |
tree | 73b5681b029c4451aca3d49eb51bf0d7376258a0 /src/scripts | |
parent | b58c901d2d59ec5e55e85c896f6b1712e81dc51a (diff) |
pyolian: wipe out declaration api
Diffstat (limited to 'src/scripts')
-rw-r--r-- | src/scripts/pyolian/eolian.py | 50 | ||||
-rw-r--r-- | src/scripts/pyolian/eolian_lib.py | 34 |
2 files changed, 0 insertions, 84 deletions
diff --git a/src/scripts/pyolian/eolian.py b/src/scripts/pyolian/eolian.py index 0693ebae05..db4b35fad0 100644 --- a/src/scripts/pyolian/eolian.py +++ b/src/scripts/pyolian/eolian.py | |||
@@ -53,7 +53,6 @@ class Eolian_Object_Type(IntEnum): | |||
53 | IMPLEMENT = 12 | 53 | IMPLEMENT = 12 |
54 | CONSTRUCTOR = 13 | 54 | CONSTRUCTOR = 13 |
55 | DOCUMENTATION = 14 | 55 | DOCUMENTATION = 14 |
56 | DECLARATION = 15 | ||
57 | 56 | ||
58 | class Eolian_Function_Type(IntEnum): | 57 | class Eolian_Function_Type(IntEnum): |
59 | UNRESOLVED = 0 | 58 | UNRESOLVED = 0 |
@@ -225,14 +224,6 @@ class Eolian_Unary_Operator(IntEnum): | |||
225 | NOT = 3 # ! int, float, bool | 224 | NOT = 3 # ! int, float, bool |
226 | BNOT = 4 # ~ int | 225 | BNOT = 4 # ~ int |
227 | 226 | ||
228 | class Eolian_Declaration_Type(IntEnum): | ||
229 | UNKNOWN = 0 | ||
230 | CLASS = 1 | ||
231 | ALIAS = 2 | ||
232 | STRUCT = 3 | ||
233 | ENUM = 4 | ||
234 | VAR = 5 | ||
235 | |||
236 | class Eolian_Doc_Token_Type(IntEnum): | 227 | class Eolian_Doc_Token_Type(IntEnum): |
237 | UNKNOWN = 0 | 228 | UNKNOWN = 0 |
238 | TEXT = 1 | 229 | TEXT = 1 |
@@ -425,19 +416,6 @@ class Eolian_Unit(EolianBaseObject): | |||
425 | def namespace_get_by_name(self, name): | 416 | def namespace_get_by_name(self, name): |
426 | return Namespace(self, name) | 417 | return Namespace(self, name) |
427 | 418 | ||
428 | @property | ||
429 | def all_declarations(self): | ||
430 | return Iterator(Declaration, lib.eolian_all_declarations_get(self._obj)) | ||
431 | |||
432 | def declaration_get_by_name(self, name): | ||
433 | c_decl = lib.eolian_declaration_get_by_name(self._obj, _str_to_bytes(name)) | ||
434 | return Declaration(c_decl) if c_decl else None | ||
435 | |||
436 | def declarations_get_by_file(self, fname): | ||
437 | return Iterator(Declaration, | ||
438 | lib.eolian_declarations_get_by_file(self._obj, _str_to_bytes(fname))) | ||
439 | |||
440 | |||
441 | class Eolian_State(Eolian_Unit): | 419 | class Eolian_State(Eolian_Unit): |
442 | def __init__(self): | 420 | def __init__(self): |
443 | self._obj = lib.eolian_state_new() # Eolian_State * | 421 | self._obj = lib.eolian_state_new() # Eolian_State * |
@@ -1458,34 +1436,6 @@ class Variable(Object): | |||
1458 | return Documentation(c_doc) if c_doc else None | 1436 | return Documentation(c_doc) if c_doc else None |
1459 | 1437 | ||
1460 | 1438 | ||
1461 | class Declaration(Object): | ||
1462 | def __repr__(self): | ||
1463 | return "<eolian.Declaration '{0.name}'>".format(self) | ||
1464 | |||
1465 | @cached_property | ||
1466 | def name(self): | ||
1467 | return _str_to_py(lib.eolian_declaration_name_get(self._obj)) | ||
1468 | |||
1469 | @cached_property | ||
1470 | def type(self): | ||
1471 | return Eolian_Declaration_Type(lib.eolian_declaration_type_get(self._obj)) | ||
1472 | |||
1473 | @cached_property | ||
1474 | def class_(self): | ||
1475 | c_cls = lib.eolian_declaration_class_get(self._obj) | ||
1476 | return Class(c_cls) if c_cls else None | ||
1477 | |||
1478 | @cached_property | ||
1479 | def data_type(self): | ||
1480 | c_typedec = lib.eolian_declaration_data_type_get(self._obj) | ||
1481 | return Typedecl(c_typedec) if c_typedec else None | ||
1482 | |||
1483 | @cached_property | ||
1484 | def variable(self): | ||
1485 | c_var = lib.eolian_declaration_variable_get(self._obj) | ||
1486 | return Variable(c_var) if c_var else None | ||
1487 | |||
1488 | |||
1489 | class _Eolian_Doc_Token_Struct(ctypes.Structure): | 1439 | class _Eolian_Doc_Token_Struct(ctypes.Structure): |
1490 | _fields_ = [("type", c_int), | 1440 | _fields_ = [("type", c_int), |
1491 | ("text", c_char_p), | 1441 | ("text", c_char_p), |
diff --git a/src/scripts/pyolian/eolian_lib.py b/src/scripts/pyolian/eolian_lib.py index 1ea3898d58..26d631234c 100644 --- a/src/scripts/pyolian/eolian_lib.py +++ b/src/scripts/pyolian/eolian_lib.py | |||
@@ -165,10 +165,6 @@ lib.eolian_state_structs_get.restype = c_void_p | |||
165 | lib.eolian_state_enums_get.argtypes = [c_void_p,] | 165 | lib.eolian_state_enums_get.argtypes = [c_void_p,] |
166 | lib.eolian_state_enums_get.restype = c_void_p | 166 | lib.eolian_state_enums_get.restype = c_void_p |
167 | 167 | ||
168 | # EAPI Eina_Iterator *eolian_declarations_get_by_file(const Eolian_State *state, const char *fname); | ||
169 | lib.eolian_declarations_get_by_file.argtypes = [c_void_p, c_char_p] | ||
170 | lib.eolian_declarations_get_by_file.restype = c_void_p | ||
171 | |||
172 | ### Eolian_Unit ############################################################# | 168 | ### Eolian_Unit ############################################################# |
173 | 169 | ||
174 | # EAPI Eina_Iterator *eolian_unit_children_get(const Eolian_Unit *unit); | 170 | # EAPI Eina_Iterator *eolian_unit_children_get(const Eolian_Unit *unit); |
@@ -227,14 +223,6 @@ lib.eolian_unit_constants_get.restype = c_void_p | |||
227 | lib.eolian_unit_globals_get.argtypes = [c_void_p,] | 223 | lib.eolian_unit_globals_get.argtypes = [c_void_p,] |
228 | lib.eolian_unit_globals_get.restype = c_void_p | 224 | lib.eolian_unit_globals_get.restype = c_void_p |
229 | 225 | ||
230 | # EAPI Eina_Iterator *eolian_all_declarations_get(const Eolian_Unit *unit); | ||
231 | lib.eolian_all_declarations_get.argtypes = [c_void_p,] | ||
232 | lib.eolian_all_declarations_get.restype = c_void_p | ||
233 | |||
234 | # EAPI const Eolian_Declaration *eolian_declaration_get_by_name(const Eolian_Unit *unit, const char *name); | ||
235 | lib.eolian_declaration_get_by_name.argtypes = [c_void_p, c_char_p] | ||
236 | lib.eolian_declaration_get_by_name.restype = c_void_p | ||
237 | |||
238 | ### Eolian_Object ########################################################### | 226 | ### Eolian_Object ########################################################### |
239 | 227 | ||
240 | # EAPI Eolian_Object_Type eolian_object_type_get(const Eolian_Object *obj); | 228 | # EAPI Eolian_Object_Type eolian_object_type_get(const Eolian_Object *obj); |
@@ -788,28 +776,6 @@ lib.eolian_variable_namespaces_get.restype = c_void_p | |||
788 | lib.eolian_variable_is_extern.argtypes = [c_void_p,] | 776 | lib.eolian_variable_is_extern.argtypes = [c_void_p,] |
789 | lib.eolian_variable_is_extern.restype = c_bool | 777 | lib.eolian_variable_is_extern.restype = c_bool |
790 | 778 | ||
791 | ### Eolian_Declaration ###################################################### | ||
792 | |||
793 | # EAPI Eolian_Declaration_Type eolian_declaration_type_get(const Eolian_Declaration *decl); | ||
794 | lib.eolian_declaration_type_get.argtypes = [c_void_p,] | ||
795 | lib.eolian_declaration_type_get.restype = c_int | ||
796 | |||
797 | # EAPI Eina_Stringshare *eolian_declaration_name_get(const Eolian_Declaration *decl); | ||
798 | lib.eolian_declaration_name_get.argtypes = [c_void_p,] | ||
799 | lib.eolian_declaration_name_get.restype = c_char_p | ||
800 | |||
801 | # EAPI const Eolian_Class *eolian_declaration_class_get(const Eolian_Declaration *decl); | ||
802 | lib.eolian_declaration_class_get.argtypes = [c_void_p,] | ||
803 | lib.eolian_declaration_class_get.restype = c_void_p | ||
804 | |||
805 | # EAPI const Eolian_Typedecl *eolian_declaration_data_type_get(const Eolian_Declaration *decl); | ||
806 | lib.eolian_declaration_data_type_get.argtypes = [c_void_p,] | ||
807 | lib.eolian_declaration_data_type_get.restype = c_void_p | ||
808 | |||
809 | # EAPI const Eolian_Variable *eolian_declaration_variable_get(const Eolian_Declaration *decl); | ||
810 | lib.eolian_declaration_variable_get.argtypes = [c_void_p,] | ||
811 | lib.eolian_declaration_variable_get.restype = c_void_p | ||
812 | |||
813 | ### Eolian_Documentation #################################################### | 779 | ### Eolian_Documentation #################################################### |
814 | 780 | ||
815 | # EAPI Eina_Stringshare *eolian_documentation_summary_get(const Eolian_Documentation *doc); | 781 | # EAPI Eina_Stringshare *eolian_documentation_summary_get(const Eolian_Documentation *doc); |