forked from enlightenment/efl
eolian: remove some unused funcs
This commit is contained in:
parent
1bbf15899b
commit
0be3aefdc7
|
@ -629,36 +629,6 @@ lex(Eo_Lexer *ls, Eo_Token *tok)
|
|||
}
|
||||
}
|
||||
|
||||
static int
|
||||
lex_balanced(Eo_Lexer *ls, Eo_Token *tok, char beg, char end)
|
||||
{
|
||||
int depth = 0, col;
|
||||
const char *str;
|
||||
eina_strbuf_reset(ls->buff);
|
||||
while (isspace(ls->current))
|
||||
next_char(ls);
|
||||
col = ls->column;
|
||||
while (ls->current)
|
||||
{
|
||||
if (ls->current == beg)
|
||||
++depth;
|
||||
else if (ls->current == end)
|
||||
--depth;
|
||||
|
||||
if (depth == -1)
|
||||
break;
|
||||
|
||||
eina_strbuf_append_char(ls->buff, ls->current);
|
||||
next_char(ls);
|
||||
}
|
||||
eina_strbuf_trim(ls->buff);
|
||||
str = eina_strbuf_string_get(ls->buff);
|
||||
tok->kw = (int)(uintptr_t)eina_hash_find(keyword_map, str);
|
||||
tok->value.s = eina_stringshare_add(str);
|
||||
ls->column = col + 1;
|
||||
return TOK_VALUE;
|
||||
}
|
||||
|
||||
static const char *
|
||||
get_filename(Eo_Lexer *ls)
|
||||
{
|
||||
|
@ -754,13 +724,6 @@ eo_lexer_new(const char *source)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
int
|
||||
eo_lexer_get_balanced(Eo_Lexer *ls, char beg, char end)
|
||||
{
|
||||
assert(ls->lookahead.token < 0);
|
||||
return (ls->t.token == lex_balanced(ls, &ls->t, beg, end));
|
||||
}
|
||||
|
||||
int
|
||||
eo_lexer_get(Eo_Lexer *ls)
|
||||
{
|
||||
|
|
|
@ -160,10 +160,6 @@ int eo_lexer_init (void);
|
|||
int eo_lexer_shutdown (void);
|
||||
Eo_Lexer *eo_lexer_new (const char *source);
|
||||
void eo_lexer_free (Eo_Lexer *ls);
|
||||
/* gets a TOK_VALUE balanced token, aka keeps lexing everything until the
|
||||
* "end" character, but keeps it balanced, so if it hits "beg" during lexing,
|
||||
* it won't end at the next "end", useful for lexing between () or [] */
|
||||
int eo_lexer_get_balanced (Eo_Lexer *ls, char beg, char end);
|
||||
/* gets a regular token, singlechar or one of TOK_something */
|
||||
int eo_lexer_get (Eo_Lexer *ls);
|
||||
/* lookahead token - see Eo_Lexer */
|
||||
|
|
Loading…
Reference in New Issue