eolian: remove some unused funcs
authorDaniel Kolesa <d.kolesa@samsung.com>
Mon, 22 Sep 2014 11:47:30 +0000 (12:47 +0100)
committerDaniel Kolesa <d.kolesa@samsung.com>
Mon, 22 Sep 2014 11:47:30 +0000 (12:47 +0100)
src/lib/eolian/eo_lexer.c
src/lib/eolian/eo_lexer.h

index 0378470..3549134 100644 (file)
@@ -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
index 56495e5..09d3ca6 100644 (file)
@@ -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 */