{
"==", "!=", ">=", "<=", "&&", "||", "<<", ">>",
- "<comment>", "<doc>", "<string>", "<char>", "<number>", "<value>",
+ "<doc>", "<string>", "<char>", "<number>", "<value>",
KEYWORDS
};
unsigned int i, u;
if (keyword_map) return;
keyword_map = eina_hash_string_superfast_new(NULL);
- for (i = u = 14; i < (sizeof(tokens) / sizeof(const char*)); ++i)
+ for (i = u = 13; i < (sizeof(tokens) / sizeof(const char*)); ++i)
{
eina_hash_add(keyword_map, tokens[i], (void*)(size_t)(i - u + 1));
}
}
static void
-read_long_comment(Eo_Lexer *ls, Eo_Token *tok, int ccol)
+read_long_comment(Eo_Lexer *ls, int ccol)
{
Eina_Bool had_star = EINA_FALSE, had_nl = EINA_FALSE;
eina_strbuf_reset(ls->buff);
}
cend:
eina_strbuf_trim(ls->buff);
- if (tok) tok->value.s = eina_stringshare_add(eina_strbuf_string_get(ls->buff));
}
enum Doc_Tokens {
next_char(ls);
if (ls->current == '*')
{
- Eina_Bool doc = EINA_FALSE;
int ccol = ls->column;
next_char(ls);
- if ((doc = (ls->current == '@')))
- next_char(ls);
- read_long_comment(ls, doc ? tok : NULL, ccol);
- if (doc)
- return TOK_COMMENT;
- else
- continue;
+ if (ls->current == '@')
+ {
+ eo_lexer_lex_error(ls, "old style documentation comment", -1);
+ return -1; /* unreachable */
+ }
+ read_long_comment(ls, ccol);
+ continue;
}
else if (ls->current != '/') return '/';
next_char(ls);
const char *
eo_lexer_keyword_str_get(int kw)
{
- return tokens[kw + 13];
+ return tokens[kw + 12];
}
Eina_Bool
static Eina_Bool
_eo_is_tokstr(int t) {
- return (t == TOK_COMMENT) || (t == TOK_STRING) || (t == TOK_VALUE);
+ return (t == TOK_STRING) || (t == TOK_VALUE);
}
void
TOK_EQ = START_CUSTOM, TOK_NQ, TOK_GE, TOK_LE,
TOK_AND, TOK_OR, TOK_LSH, TOK_RSH,
- TOK_COMMENT, TOK_DOC, TOK_STRING, TOK_CHAR, TOK_NUMBER, TOK_VALUE
+ TOK_DOC, TOK_STRING, TOK_CHAR, TOK_NUMBER, TOK_VALUE
};
/* all keywords in eolian, they can still be used as names (they're TOK_VALUE)
eo_lexer_get(ls);
}
check_next(ls, ';');
- if (ls->t.token == TOK_COMMENT)
- {
- ret->comment = eina_stringshare_ref(ls->t.value.s);
- eo_lexer_get(ls);
- }
FILL_DOC(ls, ret, doc);
}
}
end:
check_next(ls, ';');
- if (ls->t.token == TOK_COMMENT)
- {
- par->description = eina_stringshare_ref(ls->t.value.s);
- eo_lexer_get(ls);
- }
FILL_DOC(ls, par, doc);
}
line = ls->line_number;
col = ls->column;
check_next(ls, '{');
- if (ls->t.token == TOK_COMMENT)
- {
- if (is_get)
- prop->get_description = eina_stringshare_ref(ls->t.value.s);
- else
- prop->set_description = eina_stringshare_ref(ls->t.value.s);
- eo_lexer_get(ls);
- }
if (is_get)
{
FILL_DOC(ls, prop, get_doc);
line = ls->line_number;
col = ls->column;
check_next(ls, '{');
- if (ls->t.token == TOK_COMMENT)
- {
- prop->common_description = eina_stringshare_ref(ls->t.value.s);
- eo_lexer_get(ls);
- }
FILL_DOC(ls, prop, common_doc);
for (;;) switch (ls->t.kw)
{
line = ls->line_number;
col = ls->column;
check_next(ls, '{');
- if (ls->t.token == TOK_COMMENT)
- {
- meth->common_description = eina_stringshare_ref(ls->t.value.s);
- eo_lexer_get(ls);
- }
FILL_DOC(ls, meth, common_doc);
for (;;) switch (ls->t.kw)
{
has_implements = EINA_FALSE,
has_constructors = EINA_FALSE,
has_events = EINA_FALSE;
- if (ls->t.token == TOK_COMMENT)
- {
- ls->tmp.kls->description = eina_stringshare_ref(ls->t.value.s);
- eo_lexer_get(ls);
- }
FILL_DOC(ls, ls->tmp.kls, doc);
if (type == EOLIAN_CLASS_INTERFACE)
{