summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@osg.samsung.com>2018-03-09 15:19:53 +0100
committerDaniel Kolesa <d.kolesa@osg.samsung.com>2018-03-09 15:25:36 +0100
commitc7fd43ad4ed8d4a8067326ff727fa69681bd9101 (patch)
treedf2276a72adc5c2a9b2649d849b2f5a2233e843e /src
parentedda05e4d0779f7c16d0995bab082cb7ad793e1b (diff)
eolian: return Eolian_Object_Type from ref resolver
This needs only one enum and allows for better interop.
Diffstat (limited to 'src')
-rw-r--r--src/bindings/luajit/eolian.lua32
-rw-r--r--src/lib/eolian/Eolian.h18
-rw-r--r--src/lib/eolian/database_validate.c2
-rw-r--r--src/lib/eolian/eolian_database.c55
-rw-r--r--src/scripts/pyolian/eolian.py12
-rw-r--r--src/scripts/pyolian/eolian_lib.py2
-rwxr-xr-xsrc/scripts/pyolian/generator.py3
-rw-r--r--src/tests/eolian/eolian_parsing.c4
8 files changed, 32 insertions, 96 deletions
diff --git a/src/bindings/luajit/eolian.lua b/src/bindings/luajit/eolian.lua
index 7f1b659be1..ac8ad59b94 100644
--- a/src/bindings/luajit/eolian.lua
+++ b/src/bindings/luajit/eolian.lua
@@ -276,19 +276,6 @@ ffi.cdef [[
276 EOLIAN_DOC_TOKEN_MARKUP_MONOSPACE 276 EOLIAN_DOC_TOKEN_MARKUP_MONOSPACE
277 } Eolian_Doc_Token_Type; 277 } Eolian_Doc_Token_Type;
278 278
279 typedef enum {
280 EOLIAN_DOC_REF_INVALID = 0,
281 EOLIAN_DOC_REF_CLASS,
282 EOLIAN_DOC_REF_FUNC,
283 EOLIAN_DOC_REF_EVENT,
284 EOLIAN_DOC_REF_ALIAS,
285 EOLIAN_DOC_REF_STRUCT,
286 EOLIAN_DOC_REF_STRUCT_FIELD,
287 EOLIAN_DOC_REF_ENUM,
288 EOLIAN_DOC_REF_ENUM_FIELD,
289 EOLIAN_DOC_REF_VAR
290 } Eolian_Doc_Ref_Type;
291
292 typedef struct _Eolian_Doc_Token { 279 typedef struct _Eolian_Doc_Token {
293 Eolian_Doc_Token_Type type; 280 Eolian_Doc_Token_Type type;
294 const char *text, *text_end; 281 const char *text, *text_end;
@@ -494,7 +481,7 @@ ffi.cdef [[
494 void eolian_doc_token_init(Eolian_Doc_Token *tok); 481 void eolian_doc_token_init(Eolian_Doc_Token *tok);
495 Eolian_Doc_Token_Type eolian_doc_token_type_get(const Eolian_Doc_Token *tok); 482 Eolian_Doc_Token_Type eolian_doc_token_type_get(const Eolian_Doc_Token *tok);
496 char *eolian_doc_token_text_get(const Eolian_Doc_Token *tok); 483 char *eolian_doc_token_text_get(const Eolian_Doc_Token *tok);
497 Eolian_Doc_Ref_Type eolian_doc_token_ref_get(const Eolian_Unit *unit, const Eolian_Doc_Token *tok, const void **data, const void **data2); 484 Eolian_Object_Type eolian_doc_token_ref_get(const Eolian_Unit *unit, const Eolian_Doc_Token *tok, const void **data, const void **data2);
498]] 485]]
499 486
500local cutil = require("cutil") 487local cutil = require("cutil")
@@ -1815,19 +1802,6 @@ M.doc_token_type = {
1815 MARKUP_MONOSPACE = 7 1802 MARKUP_MONOSPACE = 7
1816} 1803}
1817 1804
1818M.doc_ref_type = {
1819 INVALID = 0,
1820 CLASS = 1,
1821 FUNC = 2,
1822 EVENT = 3,
1823 ALIAS = 4,
1824 STRUCT = 5,
1825 STRUCT_FIELD = 6,
1826 ENUM = 7,
1827 ENUM_FIELD = 8,
1828 VAR = 9
1829}
1830
1831M.documentation_string_split = function(str) 1805M.documentation_string_split = function(str)
1832 if not str then 1806 if not str then
1833 return {} 1807 return {}
@@ -1881,7 +1855,7 @@ M.Eolian_Doc_Token = ffi.metatype("Eolian_Doc_Token", {
1881 ref_get = function(self, unit) 1855 ref_get = function(self, unit)
1882 local stor = ffi.new("const void *[2]") 1856 local stor = ffi.new("const void *[2]")
1883 local tp = tonumber(eolian.eolian_doc_token_ref_get(unit, self, stor, stor + 1)) 1857 local tp = tonumber(eolian.eolian_doc_token_ref_get(unit, self, stor, stor + 1))
1884 local reft = M.doc_ref_type 1858 local reft = M.object_type
1885 if tp == reft.CLASS then 1859 if tp == reft.CLASS then
1886 return tp, ffi.cast("const Eolian_Class *", stor[0]) 1860 return tp, ffi.cast("const Eolian_Class *", stor[0])
1887 elseif tp == reft.FUNC then 1861 elseif tp == reft.FUNC then
@@ -1905,7 +1879,7 @@ M.Eolian_Doc_Token = ffi.metatype("Eolian_Doc_Token", {
1905 elseif tp == reft.VAR then 1879 elseif tp == reft.VAR then
1906 return tp, ffi.cast("const Eolian_Variable *", stor[0]) 1880 return tp, ffi.cast("const Eolian_Variable *", stor[0])
1907 else 1881 else
1908 return reft.INVALID 1882 return reft.UNKNOWN
1909 end 1883 end
1910 end 1884 end
1911 } 1885 }
diff --git a/src/lib/eolian/Eolian.h b/src/lib/eolian/Eolian.h
index 4c460fad2d..1d34e0df21 100644
--- a/src/lib/eolian/Eolian.h
+++ b/src/lib/eolian/Eolian.h
@@ -449,20 +449,6 @@ typedef enum
449 EOLIAN_DOC_TOKEN_MARKUP_MONOSPACE 449 EOLIAN_DOC_TOKEN_MARKUP_MONOSPACE
450} Eolian_Doc_Token_Type; 450} Eolian_Doc_Token_Type;
451 451
452typedef enum
453{
454 EOLIAN_DOC_REF_INVALID = 0,
455 EOLIAN_DOC_REF_CLASS,
456 EOLIAN_DOC_REF_FUNC,
457 EOLIAN_DOC_REF_EVENT,
458 EOLIAN_DOC_REF_ALIAS,
459 EOLIAN_DOC_REF_STRUCT,
460 EOLIAN_DOC_REF_STRUCT_FIELD,
461 EOLIAN_DOC_REF_ENUM,
462 EOLIAN_DOC_REF_ENUM_FIELD,
463 EOLIAN_DOC_REF_VAR
464} Eolian_Doc_Ref_Type;
465
466typedef struct _Eolian_Doc_Token 452typedef struct _Eolian_Doc_Token
467{ 453{
468 Eolian_Doc_Token_Type type; 454 Eolian_Doc_Token_Type type;
@@ -2779,7 +2765,7 @@ EAPI char *eolian_doc_token_text_get(const Eolian_Doc_Token *tok);
2779/* 2765/*
2780 * @brief Get the thing that a reference token references. 2766 * @brief Get the thing that a reference token references.
2781 * 2767 *
2782 * Returns EOLIAN_DOC_REF_INVALID on failure (when not ref token or 2768 * Returns EOLIAN_OBJECT_UNKNOWN on failure (when not ref token or
2783 * invalid ref, but invalid refs don't happen when database is valid). 2769 * invalid ref, but invalid refs don't happen when database is valid).
2784 * 2770 *
2785 * When the reference is a class, alias, struct, enum or var, the first data arg 2771 * When the reference is a class, alias, struct, enum or var, the first data arg
@@ -2794,7 +2780,7 @@ EAPI char *eolian_doc_token_text_get(const Eolian_Doc_Token *tok);
2794 * @param[out] data2 the secondary data 2780 * @param[out] data2 the secondary data
2795 * @return the kind of reference this is 2781 * @return the kind of reference this is
2796 */ 2782 */
2797EAPI Eolian_Doc_Ref_Type eolian_doc_token_ref_get(const Eolian_Unit *unit, const Eolian_Doc_Token *tok, const void **data, const void **data2); 2783EAPI Eolian_Object_Type eolian_doc_token_ref_get(const Eolian_Unit *unit, const Eolian_Doc_Token *tok, const void **data, const void **data2);
2798 2784
2799#endif 2785#endif
2800 2786
diff --git a/src/lib/eolian/database_validate.c b/src/lib/eolian/database_validate.c
index 90a0b54e4d..5733db3141 100644
--- a/src/lib/eolian/database_validate.c
+++ b/src/lib/eolian/database_validate.c
@@ -35,7 +35,7 @@ _validate_docstr(const Eolian_Unit *src, Eina_Stringshare *str, const Eolian_Obj
35 eolian_doc_token_init(&tok); 35 eolian_doc_token_init(&tok);
36 while (ret && (doc = eolian_documentation_tokenize(doc, &tok))) 36 while (ret && (doc = eolian_documentation_tokenize(doc, &tok)))
37 if (eolian_doc_token_type_get(&tok) == EOLIAN_DOC_TOKEN_REF) 37 if (eolian_doc_token_type_get(&tok) == EOLIAN_DOC_TOKEN_REF)
38 if (eolian_doc_token_ref_get(src, &tok, NULL, NULL) == EOLIAN_DOC_REF_INVALID) 38 if (eolian_doc_token_ref_get(src, &tok, NULL, NULL) == EOLIAN_OBJECT_UNKNOWN)
39 { 39 {
40 char *refn = eolian_doc_token_text_get(&tok); 40 char *refn = eolian_doc_token_text_get(&tok);
41 _eolian_log_line(info->file, info->line, info->column, 41 _eolian_log_line(info->file, info->line, info->column,
diff --git a/src/lib/eolian/eolian_database.c b/src/lib/eolian/eolian_database.c
index 412f2957a5..bd4d22a35a 100644
--- a/src/lib/eolian/eolian_database.c
+++ b/src/lib/eolian/eolian_database.c
@@ -289,38 +289,38 @@ eolian_doc_token_text_get(const Eolian_Doc_Token *tok)
289 return ptr; 289 return ptr;
290} 290}
291 291
292static Eolian_Doc_Ref_Type 292static Eolian_Object_Type
293_resolve_event(const Eolian_Unit *src, char *name, const void **data, 293_resolve_event(const Eolian_Unit *src, char *name, const void **data,
294 const void **data2) 294 const void **data2)
295{ 295{
296 /* never trust the user */ 296 /* never trust the user */
297 if (name[0] == ',') 297 if (name[0] == ',')
298 return EOLIAN_DOC_REF_INVALID; 298 return EOLIAN_OBJECT_UNKNOWN;
299 299
300 char *evname = strrchr(name, '.'); 300 char *evname = strrchr(name, '.');
301 if (!evname) 301 if (!evname)
302 return EOLIAN_DOC_REF_INVALID; 302 return EOLIAN_OBJECT_UNKNOWN;
303 303
304 *evname++ = '\0'; 304 *evname++ = '\0';
305 const Eolian_Class *cl = eolian_unit_class_by_name_get(src, name); 305 const Eolian_Class *cl = eolian_unit_class_by_name_get(src, name);
306 if (!cl) 306 if (!cl)
307 return EOLIAN_DOC_REF_INVALID; 307 return EOLIAN_OBJECT_UNKNOWN;
308 308
309 const Eolian_Event *ev = eolian_class_event_get_by_name(cl, evname); 309 const Eolian_Event *ev = eolian_class_event_get_by_name(cl, evname);
310 if (!ev) 310 if (!ev)
311 return EOLIAN_DOC_REF_INVALID; 311 return EOLIAN_OBJECT_UNKNOWN;
312 312
313 if (data) *data = cl; 313 if (data) *data = cl;
314 if (data2) *data2 = ev; 314 if (data2) *data2 = ev;
315 return EOLIAN_DOC_REF_EVENT; 315 return EOLIAN_OBJECT_EVENT;
316} 316}
317 317
318EAPI Eolian_Doc_Ref_Type 318EAPI Eolian_Object_Type
319eolian_doc_token_ref_get(const Eolian_Unit *unit, const Eolian_Doc_Token *tok, 319eolian_doc_token_ref_get(const Eolian_Unit *unit, const Eolian_Doc_Token *tok,
320 const void **data, const void **data2) 320 const void **data, const void **data2)
321{ 321{
322 if (tok->type != EOLIAN_DOC_TOKEN_REF) 322 if (tok->type != EOLIAN_DOC_TOKEN_REF)
323 return EOLIAN_DOC_REF_INVALID; 323 return EOLIAN_OBJECT_UNKNOWN;
324 324
325 size_t nlen = tok->text_end - tok->text; 325 size_t nlen = tok->text_end - tok->text;
326 326
@@ -343,27 +343,16 @@ eolian_doc_token_ref_get(const Eolian_Unit *unit, const Eolian_Doc_Token *tok,
343 if (decl) 343 if (decl)
344 { 344 {
345 if (data) *data = decl; 345 if (data) *data = decl;
346 switch (eolian_object_type_get(decl)) 346 Eolian_Object_Type tp = eolian_object_type_get(decl);
347 switch (tp)
347 { 348 {
348 case EOLIAN_OBJECT_CLASS: 349 case EOLIAN_OBJECT_CLASS:
349 return EOLIAN_DOC_REF_CLASS;
350 case EOLIAN_OBJECT_TYPEDECL: 350 case EOLIAN_OBJECT_TYPEDECL:
351 switch (eolian_typedecl_type_get((Eolian_Typedecl *)decl))
352 {
353 case EOLIAN_TYPEDECL_ALIAS:
354 return EOLIAN_DOC_REF_ALIAS;
355 case EOLIAN_TYPEDECL_STRUCT:
356 case EOLIAN_TYPEDECL_STRUCT_OPAQUE:
357 return EOLIAN_DOC_REF_STRUCT;
358 case EOLIAN_TYPEDECL_ENUM:
359 return EOLIAN_DOC_REF_ENUM;
360 default:
361 return EOLIAN_DOC_REF_INVALID;
362 }
363 case EOLIAN_OBJECT_VARIABLE: 351 case EOLIAN_OBJECT_VARIABLE:
364 return EOLIAN_DOC_REF_VAR; 352 /* we only allow certain types to be referenced */
353 return tp;
365 default: 354 default:
366 return EOLIAN_DOC_REF_INVALID; 355 return EOLIAN_OBJECT_UNKNOWN;
367 } 356 }
368 } 357 }
369 358
@@ -372,7 +361,7 @@ eolian_doc_token_ref_get(const Eolian_Unit *unit, const Eolian_Doc_Token *tok,
372 char *suffix = strrchr(name, '.'); 361 char *suffix = strrchr(name, '.');
373 /* no suffix, therefore invalid */ 362 /* no suffix, therefore invalid */
374 if (!suffix) 363 if (!suffix)
375 return EOLIAN_DOC_REF_INVALID; 364 return EOLIAN_OBJECT_UNKNOWN;
376 365
377 /* name will terminate before suffix, suffix will be standalone */ 366 /* name will terminate before suffix, suffix will be standalone */
378 *suffix++ = '\0'; 367 *suffix++ = '\0';
@@ -384,10 +373,10 @@ eolian_doc_token_ref_get(const Eolian_Unit *unit, const Eolian_Doc_Token *tok,
384 const Eolian_Struct_Type_Field *fld = eolian_typedecl_struct_field_get(tpd, suffix); 373 const Eolian_Struct_Type_Field *fld = eolian_typedecl_struct_field_get(tpd, suffix);
385 /* field itself is invalid */ 374 /* field itself is invalid */
386 if (!fld) 375 if (!fld)
387 return EOLIAN_DOC_REF_INVALID; 376 return EOLIAN_OBJECT_UNKNOWN;
388 if (data) *data = tpd; 377 if (data) *data = tpd;
389 if (data2) *data2 = fld; 378 if (data2) *data2 = fld;
390 return EOLIAN_DOC_REF_STRUCT_FIELD; 379 return EOLIAN_OBJECT_STRUCT_FIELD;
391 } 380 }
392 381
393 /* try an enum field */ 382 /* try an enum field */
@@ -397,10 +386,10 @@ eolian_doc_token_ref_get(const Eolian_Unit *unit, const Eolian_Doc_Token *tok,
397 const Eolian_Enum_Type_Field *fld = eolian_typedecl_enum_field_get(tpd, suffix); 386 const Eolian_Enum_Type_Field *fld = eolian_typedecl_enum_field_get(tpd, suffix);
398 /* field itself is invalid */ 387 /* field itself is invalid */
399 if (!fld) 388 if (!fld)
400 return EOLIAN_DOC_REF_INVALID; 389 return EOLIAN_OBJECT_UNKNOWN;
401 if (data) *data = tpd; 390 if (data) *data = tpd;
402 if (data2) *data2 = fld; 391 if (data2) *data2 = fld;
403 return EOLIAN_DOC_REF_ENUM_FIELD; 392 return EOLIAN_OBJECT_ENUM_FIELD;
404 } 393 }
405 394
406 /* now it can only be a function or invalid */ 395 /* now it can only be a function or invalid */
@@ -416,23 +405,23 @@ eolian_doc_token_ref_get(const Eolian_Unit *unit, const Eolian_Doc_Token *tok,
416 suffix = strrchr(name, '.'); 405 suffix = strrchr(name, '.');
417 /* wrong suffix, therefore invalid */ 406 /* wrong suffix, therefore invalid */
418 if (!suffix) 407 if (!suffix)
419 return EOLIAN_DOC_REF_INVALID; 408 return EOLIAN_OBJECT_UNKNOWN;
420 /* re-terminate */ 409 /* re-terminate */
421 *suffix++ = '\0'; 410 *suffix++ = '\0';
422 } 411 }
423 412
424 const Eolian_Class *cl = eolian_unit_class_by_name_get(unit, name); 413 const Eolian_Class *cl = eolian_unit_class_by_name_get(unit, name);
425 if (!cl) 414 if (!cl)
426 return EOLIAN_DOC_REF_INVALID; 415 return EOLIAN_OBJECT_UNKNOWN;
427 416
428 const Eolian_Function *fid = eolian_class_function_get_by_name(cl, suffix, ftype); 417 const Eolian_Function *fid = eolian_class_function_get_by_name(cl, suffix, ftype);
429 if (!fid) 418 if (!fid)
430 return EOLIAN_DOC_REF_INVALID; 419 return EOLIAN_OBJECT_UNKNOWN;
431 420
432 /* got a func */ 421 /* got a func */
433 if (data) *data = cl; 422 if (data) *data = cl;
434 if (data2) *data2 = fid; 423 if (data2) *data2 = fid;
435 return EOLIAN_DOC_REF_FUNC; 424 return EOLIAN_OBJECT_FUNCTION;
436} 425}
437 426
438void 427void
diff --git a/src/scripts/pyolian/eolian.py b/src/scripts/pyolian/eolian.py
index e3ce9d68e2..998006b54f 100644
--- a/src/scripts/pyolian/eolian.py
+++ b/src/scripts/pyolian/eolian.py
@@ -234,18 +234,6 @@ class Eolian_Doc_Token_Type(IntEnum):
234 MARK_TODO = 6 234 MARK_TODO = 6
235 MARKUP_MONOSPACE = 7 235 MARKUP_MONOSPACE = 7
236 236
237class Eolian_Doc_Ref_Type(IntEnum):
238 INVALID = 0
239 CLASS = 1
240 FUNC = 2
241 EVENT = 3
242 ALIAS = 4
243 STRUCT = 5
244 STRUCT_FIELD = 6
245 ENUM = 7
246 ENUM_FIELD = 8
247 VAR = 9
248
249 237
250### internal Classes ######################################################## 238### internal Classes ########################################################
251 239
diff --git a/src/scripts/pyolian/eolian_lib.py b/src/scripts/pyolian/eolian_lib.py
index e226bc1763..30d124fc05 100644
--- a/src/scripts/pyolian/eolian_lib.py
+++ b/src/scripts/pyolian/eolian_lib.py
@@ -831,7 +831,7 @@ lib.eolian_doc_token_type_get.restype = c_int
831lib.eolian_doc_token_text_get.argtypes = [c_void_p,] 831lib.eolian_doc_token_text_get.argtypes = [c_void_p,]
832lib.eolian_doc_token_text_get.restype = c_void_p # char* TO BE FREED 832lib.eolian_doc_token_text_get.restype = c_void_p # char* TO BE FREED
833 833
834# EAPI Eolian_Doc_Ref_Type eolian_doc_token_ref_get(const Eolian_Unit *unit, const Eolian_Doc_Token *tok, const void **data, const void **data2); 834# EAPI Eolian_Object_Type eolian_doc_token_ref_get(const Eolian_Unit *unit, const Eolian_Doc_Token *tok, const void **data, const void **data2);
835# lib.eolian_doc_token_ref_get.argtypes = [c_void_p, c_void_p, ???, ???] 835# lib.eolian_doc_token_ref_get.argtypes = [c_void_p, c_void_p, ???, ???]
836# lib.eolian_doc_token_ref_get.restype = c_int 836# lib.eolian_doc_token_ref_get.restype = c_int
837 837
diff --git a/src/scripts/pyolian/generator.py b/src/scripts/pyolian/generator.py
index 067d7b52c6..64e6abe5ce 100755
--- a/src/scripts/pyolian/generator.py
+++ b/src/scripts/pyolian/generator.py
@@ -129,6 +129,7 @@ class Template(pyratemp.Template):
129 'Documentation': eolian.Documentation, 129 'Documentation': eolian.Documentation,
130 'Documentation_Token': eolian.Documentation_Token, 130 'Documentation_Token': eolian.Documentation_Token,
131 # Eolian Enums 131 # Eolian Enums
132 'Eolian_Object_Type': eolian.Eolian_Object_Type,
132 'Eolian_Function_Type': eolian.Eolian_Function_Type, 133 'Eolian_Function_Type': eolian.Eolian_Function_Type,
133 'Eolian_Parameter_Dir': eolian.Eolian_Parameter_Dir, 134 'Eolian_Parameter_Dir': eolian.Eolian_Parameter_Dir,
134 'Eolian_Class_Type': eolian.Eolian_Class_Type, 135 'Eolian_Class_Type': eolian.Eolian_Class_Type,
@@ -142,9 +143,7 @@ class Template(pyratemp.Template):
142 'Eolian_Variable_Type': eolian.Eolian_Variable_Type, 143 'Eolian_Variable_Type': eolian.Eolian_Variable_Type,
143 'Eolian_Binary_Operator': eolian.Eolian_Binary_Operator, 144 'Eolian_Binary_Operator': eolian.Eolian_Binary_Operator,
144 'Eolian_Unary_Operator': eolian.Eolian_Unary_Operator, 145 'Eolian_Unary_Operator': eolian.Eolian_Unary_Operator,
145 'Eolian_Declaration_Type': eolian.Eolian_Declaration_Type,
146 'Eolian_Doc_Token_Type': eolian.Eolian_Doc_Token_Type, 146 'Eolian_Doc_Token_Type': eolian.Eolian_Doc_Token_Type,
147 'Eolian_Doc_Ref_Type': eolian.Eolian_Doc_Ref_Type,
148 }) 147 })
149 148
150 # Call the parent __init__ func 149 # Call the parent __init__ func
diff --git a/src/tests/eolian/eolian_parsing.c b/src/tests/eolian/eolian_parsing.c
index 00ca5ec12b..f333a84b34 100644
--- a/src/tests/eolian/eolian_parsing.c
+++ b/src/tests/eolian/eolian_parsing.c
@@ -1256,7 +1256,7 @@ START_TEST(eolian_docs)
1256 fail_if(eolian_doc_token_type_get(&tok) != EOLIAN_DOC_TOKEN_REF); 1256 fail_if(eolian_doc_token_type_get(&tok) != EOLIAN_DOC_TOKEN_REF);
1257 txt = eolian_doc_token_text_get(&tok); 1257 txt = eolian_doc_token_text_get(&tok);
1258 fail_if(strcmp(txt, "pants")); 1258 fail_if(strcmp(txt, "pants"));
1259 fail_if(eolian_doc_token_ref_get(unit, &tok, NULL, NULL) != EOLIAN_DOC_REF_VAR); 1259 fail_if(eolian_doc_token_ref_get(unit, &tok, NULL, NULL) != EOLIAN_OBJECT_VARIABLE);
1260 free(txt); 1260 free(txt);
1261 tdoc = eolian_documentation_tokenize(tdoc, &tok); 1261 tdoc = eolian_documentation_tokenize(tdoc, &tok);
1262 fail_if(eolian_doc_token_type_get(&tok) != EOLIAN_DOC_TOKEN_TEXT); 1262 fail_if(eolian_doc_token_type_get(&tok) != EOLIAN_DOC_TOKEN_TEXT);
@@ -1267,7 +1267,7 @@ START_TEST(eolian_docs)
1267 fail_if(eolian_doc_token_type_get(&tok) != EOLIAN_DOC_TOKEN_REF); 1267 fail_if(eolian_doc_token_type_get(&tok) != EOLIAN_DOC_TOKEN_REF);
1268 txt = eolian_doc_token_text_get(&tok); 1268 txt = eolian_doc_token_text_get(&tok);
1269 fail_if(strcmp(txt, "Docs.meth")); 1269 fail_if(strcmp(txt, "Docs.meth"));
1270 fail_if(eolian_doc_token_ref_get(unit, &tok, NULL, NULL) != EOLIAN_DOC_REF_FUNC); 1270 fail_if(eolian_doc_token_ref_get(unit, &tok, NULL, NULL) != EOLIAN_OBJECT_FUNCTION);
1271 free(txt); 1271 free(txt);
1272 tdoc = eolian_documentation_tokenize(tdoc, &tok); 1272 tdoc = eolian_documentation_tokenize(tdoc, &tok);
1273 fail_if(eolian_doc_token_type_get(&tok) != EOLIAN_DOC_TOKEN_TEXT); 1273 fail_if(eolian_doc_token_type_get(&tok) != EOLIAN_DOC_TOKEN_TEXT);