summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Kolesa <d.kolesa@osg.samsung.com>2017-12-14 16:38:35 +0100
committerDaniel Kolesa <d.kolesa@osg.samsung.com>2017-12-14 16:38:35 +0100
commitf9868b541ea57ade726e7d474d8d80c2b298a283 (patch)
treea9045f851272b08d220e87021c3e63dddb6980c1
parent011bbfdc9321616673504fba68843fd802b85c69 (diff)
eolian: store unit inside lexer
-rw-r--r--src/lib/eolian/eo_lexer.c1
-rw-r--r--src/lib/eolian/eo_lexer.h2
2 files changed, 3 insertions, 0 deletions
diff --git a/src/lib/eolian/eo_lexer.c b/src/lib/eolian/eo_lexer.c
index 1aa02ae777..afe7cc8a4c 100644
--- a/src/lib/eolian/eo_lexer.c
+++ b/src/lib/eolian/eo_lexer.c
@@ -1046,6 +1046,7 @@ eo_lexer_set_input(Eo_Lexer *ls, Eolian *state, const char *source)
1046 next_char(ls); 1046 next_char(ls);
1047 1047
1048 Eolian_Unit *ncunit = calloc(1, sizeof(Eolian_Unit)); 1048 Eolian_Unit *ncunit = calloc(1, sizeof(Eolian_Unit));
1049 ls->unit = ncunit;
1049 database_unit_init(state, ncunit, ls->filename); 1050 database_unit_init(state, ncunit, ls->filename);
1050 eina_hash_add(state->units, ls->filename, ncunit); 1051 eina_hash_add(state->units, ls->filename, ncunit);
1051} 1052}
diff --git a/src/lib/eolian/eo_lexer.h b/src/lib/eolian/eo_lexer.h
index e6f3249dcd..9ca577101b 100644
--- a/src/lib/eolian/eo_lexer.h
+++ b/src/lib/eolian/eo_lexer.h
@@ -168,6 +168,8 @@ typedef struct _Eo_Lexer
168 const char *stream_line; 168 const char *stream_line;
169 /* a pointer to the state this lexer belongs to */ 169 /* a pointer to the state this lexer belongs to */
170 Eolian *state; 170 Eolian *state;
171 /* the unit being filled during current parsing */
172 Eolian_Unit *unit;
171 /* this is jumped to when an error happens */ 173 /* this is jumped to when an error happens */
172 jmp_buf err_jmp; 174 jmp_buf err_jmp;
173 175