forked from enlightenment/efl
eolian: store unit inside lexer
This commit is contained in:
parent
011bbfdc93
commit
f9868b541e
|
@ -1046,6 +1046,7 @@ eo_lexer_set_input(Eo_Lexer *ls, Eolian *state, const char *source)
|
|||
next_char(ls);
|
||||
|
||||
Eolian_Unit *ncunit = calloc(1, sizeof(Eolian_Unit));
|
||||
ls->unit = ncunit;
|
||||
database_unit_init(state, ncunit, ls->filename);
|
||||
eina_hash_add(state->units, ls->filename, ncunit);
|
||||
}
|
||||
|
|
|
@ -168,6 +168,8 @@ typedef struct _Eo_Lexer
|
|||
const char *stream_line;
|
||||
/* a pointer to the state this lexer belongs to */
|
||||
Eolian *state;
|
||||
/* the unit being filled during current parsing */
|
||||
Eolian_Unit *unit;
|
||||
/* this is jumped to when an error happens */
|
||||
jmp_buf err_jmp;
|
||||
|
||||
|
|
Loading…
Reference in New Issue