diff options
Diffstat (limited to 'src/lib/eolian/eo_lexer.c')
-rw-r--r-- | src/lib/eolian/eo_lexer.c | 37 |
1 files changed, 0 insertions, 37 deletions
diff --git a/src/lib/eolian/eo_lexer.c b/src/lib/eolian/eo_lexer.c index 03784702eb..3549134a1b 100644 --- a/src/lib/eolian/eo_lexer.c +++ b/src/lib/eolian/eo_lexer.c @@ -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) { @@ -755,13 +725,6 @@ eo_lexer_new(const char *source) } 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) { if (ls->t.token >= START_CUSTOM && ls->t.token != TOK_NUMBER |