summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@osg.samsung.com>2015-06-23 16:44:17 +0100
committerDaniel Kolesa <d.kolesa@osg.samsung.com>2015-06-23 16:44:17 +0100
commit71a8b9d119a84dec621010e2397ad546d559b298 (patch)
tree8ced39eaa2571b2444aa0bb26a6392f31c187e37 /src
parent0fe4d4aa37088f10b082ce36864b48620ffebdb8 (diff)
eolian: relax doc parsing a little (no need to check if @since is allowed)
Diffstat (limited to 'src')
-rw-r--r--src/lib/eolian/eo_lexer.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/eolian/eo_lexer.c b/src/lib/eolian/eo_lexer.c
index 3a835e5..5ecdd87 100644
--- a/src/lib/eolian/eo_lexer.c
+++ b/src/lib/eolian/eo_lexer.c
@@ -257,7 +257,7 @@ enum Doc_Tokens {
257}; 257};
258 258
259static int 259static int
260doc_lex(Eo_Lexer *ls, Eina_Bool *term, Eina_Bool allow_since) 260doc_lex(Eo_Lexer *ls, Eina_Bool *term)
261{ 261{
262 int tokret = -1; 262 int tokret = -1;
263 Eina_Bool contdoc = EINA_FALSE; 263 Eina_Bool contdoc = EINA_FALSE;
@@ -328,8 +328,6 @@ doc_lex(Eo_Lexer *ls, Eina_Bool *term, Eina_Bool allow_since)
328 if (!strcmp(eina_strbuf_string_get(ls->buff), "@since")) 328 if (!strcmp(eina_strbuf_string_get(ls->buff), "@since"))
329 { 329 {
330 /* since-token */ 330 /* since-token */
331 if (!allow_since)
332 return DOC_MANGLED;
333 eina_strbuf_reset(ls->buff); 331 eina_strbuf_reset(ls->buff);
334 skip_ws(ls); 332 skip_ws(ls);
335 while (ls->current && (ls->current == '.' || 333 while (ls->current && (ls->current == '.' ||
@@ -389,7 +387,7 @@ read_doc(Eo_Lexer *ls, Eo_Token *tok, int line, int column)
389 Eina_Bool term = EINA_FALSE; 387 Eina_Bool term = EINA_FALSE;
390 while (!term) 388 while (!term)
391 { 389 {
392 int read = doc_lex(ls, &term, !!doc->summary); 390 int read = doc_lex(ls, &term);
393 switch (read) 391 switch (read)
394 { 392 {
395 case DOC_MANGLED: 393 case DOC_MANGLED:
@@ -416,6 +414,8 @@ read_doc(Eo_Lexer *ls, Eo_Token *tok, int line, int column)
416 414
417 if (eina_strbuf_length_get(rbuf)) 415 if (eina_strbuf_length_get(rbuf))
418 doc->description = eina_stringshare_add(eina_strbuf_string_get(rbuf)); 416 doc->description = eina_stringshare_add(eina_strbuf_string_get(rbuf));
417 if (!doc->summary)
418 doc->summary = eina_stringshare_add("No description supplied.");
419 eina_strbuf_free(rbuf); 419 eina_strbuf_free(rbuf);
420 tok->value.doc = doc; 420 tok->value.doc = doc;
421} 421}