summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@samsung.com>2014-08-08 13:16:02 +0100
committerDaniel Kolesa <d.kolesa@samsung.com>2014-08-21 09:26:04 +0100
commita57c729b1032ee305dccf40b33d0054a84ced155 (patch)
tree4b6f7de6a085485d989017c8dbde06d7dfafc232
parent1cb831899116b5cfd47c2d3fdcc5e60b870edd57 (diff)
downloadefl-a57c729b1032ee305dccf40b33d0054a84ced155.tar.gz
eolian: consume private/protected modifier on events
-rw-r--r--src/lib/eolian/eo_lexer.h5
-rw-r--r--src/lib/eolian/eo_parser.c7
2 files changed, 4 insertions, 8 deletions
diff --git a/src/lib/eolian/eo_lexer.h b/src/lib/eolian/eo_lexer.h
index 67485ee148..60281c24d7 100644
--- a/src/lib/eolian/eo_lexer.h
+++ b/src/lib/eolian/eo_lexer.h
@@ -21,8 +21,7 @@ enum Tokens
/* all keywords in eolian, they can still be used as names (they're TOK_VALUE)
* they just fill in the "kw" field of the token */
-#define KEYWORDS KW(class), KW(const), KW(private), KW(return), KW(struct), \
- KW(virtual), \
+#define KEYWORDS KW(class), KW(const), KW(return), KW(struct), KW(virtual), \
\
KW(abstract), KW(constructor), KW(constructors), KW(data), \
KW(destructor), KW(eo_prefix), KW(events), KW(func), KW(get), \
@@ -30,7 +29,7 @@ enum Tokens
KW(methods), KW(mixin), KW(own), KW(params), KW(properties), KW(set), \
KW(type), KW(values), KWAT(class), KWAT(const), KWAT(constructor), \
KWAT(extern), KWAT(in), KWAT(inout), KWAT(nonull), KWAT(out), \
- KWAT(protected), KWAT(warn_unused), \
+ KWAT(private), KWAT(protected), KWAT(warn_unused), \
\
KW(byte), KW(ubyte), KW(char), KW(short), KW(ushort), KW(int), KW(uint), \
KW(long), KW(ulong), KW(llong), KW(ullong), \
diff --git a/src/lib/eolian/eo_parser.c b/src/lib/eolian/eo_parser.c
index 3e2f635a66..abf6dffdc8 100644
--- a/src/lib/eolian/eo_parser.c
+++ b/src/lib/eolian/eo_parser.c
@@ -1283,11 +1283,6 @@ parse_event(Eo_Lexer *ls)
ev->base.column = ls->column;
Eina_Strbuf *buf = push_strbuf(ls);
ls->tmp.event = ev;
- /* code path not in use yet
- if (ls->t.kw == KW_private)
- {
- eo_lexer_get(ls);
- }*/
check(ls, TOK_VALUE);
eina_strbuf_append(buf, ls->t.value.s);
eo_lexer_get(ls);
@@ -1301,6 +1296,8 @@ parse_event(Eo_Lexer *ls)
}
ev->name = eina_stringshare_add(eina_strbuf_string_get(buf));
pop_strbuf(ls);
+ if (ls->t.kw == KW_at_private || ls->t.kw == KW_at_protected)
+ eo_lexer_get(ls);
if (ls->t.token == ':')
{
eo_lexer_get(ls);