eolian: skip UTF-8 BOM if present

This commit is contained in:
Daniel Kolesa 2014-09-05 10:04:11 +01:00
parent 05a5b4e1b9
commit 99b03d4f3c
1 changed files with 9 additions and 0 deletions

View File

@ -687,6 +687,15 @@ eo_lexer_set_input(Eo_Lexer *ls, const char *source)
ls->line_number = 1;
ls->icolumn = ls->column = 0;
next_char(ls);
if (ls->current != 0xEF)
return;
next_char(ls);
if (ls->current != 0xBB)
return;
next_char(ls);
if (ls->current != 0xBF)
return;
next_char(ls);
}
void