forked from enlightenment/efl
eolian: remove handling of short refs in tokenizer
Already expanded in the main lexer.
This commit is contained in:
parent
d2105f99d4
commit
66b48f8f5d
|
@ -267,12 +267,6 @@ _get_ref_token(const char *doc, const char **doc_end)
|
||||||
if (is_event)
|
if (is_event)
|
||||||
++doc;
|
++doc;
|
||||||
|
|
||||||
if ((doc[0] == '.') && (doc[1] != '_') && !isalpha(doc[1]))
|
|
||||||
return EOLIAN_DOC_TOKEN_UNKNOWN;
|
|
||||||
|
|
||||||
if (doc[0] == '.')
|
|
||||||
++doc;
|
|
||||||
|
|
||||||
if (_skip_ref_word(&doc))
|
if (_skip_ref_word(&doc))
|
||||||
{
|
{
|
||||||
while (doc[0] == '.')
|
while (doc[0] == '.')
|
||||||
|
@ -294,6 +288,8 @@ _get_ref_token(const char *doc, const char **doc_end)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
return EOLIAN_DOC_TOKEN_UNKNOWN;
|
||||||
|
|
||||||
if (is_event)
|
if (is_event)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1199,7 +1199,7 @@ START_TEST(eolian_docs)
|
||||||
EINA_LIST_FREE(sdoc, dpar)
|
EINA_LIST_FREE(sdoc, dpar)
|
||||||
free(dpar);
|
free(dpar);
|
||||||
|
|
||||||
const char *tdoc = "Note: This is $something, see @Blah, @.bleh, "
|
const char *tdoc = "Note: This is $something, see @Blah, "
|
||||||
"@Foo.Bar.baz, \\@ref foo and @[Things.Stuffs.foo,bar].";
|
"@Foo.Bar.baz, \\@ref foo and @[Things.Stuffs.foo,bar].";
|
||||||
|
|
||||||
Eolian_Doc_Token tok;
|
Eolian_Doc_Token tok;
|
||||||
|
@ -1238,16 +1238,6 @@ START_TEST(eolian_docs)
|
||||||
tdoc = eolian_documentation_tokenize(tdoc, &tok);
|
tdoc = eolian_documentation_tokenize(tdoc, &tok);
|
||||||
fail_if(eolian_doc_token_type_get(&tok) != EOLIAN_DOC_TOKEN_REF);
|
fail_if(eolian_doc_token_type_get(&tok) != EOLIAN_DOC_TOKEN_REF);
|
||||||
txt = eolian_doc_token_text_get(&tok);
|
txt = eolian_doc_token_text_get(&tok);
|
||||||
fail_if(strcmp(txt, ".bleh"));
|
|
||||||
free(txt);
|
|
||||||
tdoc = eolian_documentation_tokenize(tdoc, &tok);
|
|
||||||
fail_if(eolian_doc_token_type_get(&tok) != EOLIAN_DOC_TOKEN_TEXT);
|
|
||||||
txt = eolian_doc_token_text_get(&tok);
|
|
||||||
fail_if(strcmp(txt, ", "));
|
|
||||||
free(txt);
|
|
||||||
tdoc = eolian_documentation_tokenize(tdoc, &tok);
|
|
||||||
fail_if(eolian_doc_token_type_get(&tok) != EOLIAN_DOC_TOKEN_REF);
|
|
||||||
txt = eolian_doc_token_text_get(&tok);
|
|
||||||
fail_if(strcmp(txt, "Foo.Bar.baz"));
|
fail_if(strcmp(txt, "Foo.Bar.baz"));
|
||||||
free(txt);
|
free(txt);
|
||||||
tdoc = eolian_documentation_tokenize(tdoc, &tok);
|
tdoc = eolian_documentation_tokenize(tdoc, &tok);
|
||||||
|
|
Loading…
Reference in New Issue