Fix assertion !lit_utf8_iterator_is_eos (iter_p) in lexer.

JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov a.shitov@samsung.com
This commit is contained in:
Andrey Shitov
2015-07-10 14:49:50 +03:00
parent 64bbf2752e
commit 60bd718fb5
+6
View File
@@ -383,8 +383,11 @@ lexer_transform_escape_sequences (const jerry_api_char_t *source_str_p, /**< str
if (char_after_next == LIT_CHAR_0 if (char_after_next == LIT_CHAR_0
&& (lit_utf8_iterator_is_eos (&source_str_iter) && (lit_utf8_iterator_is_eos (&source_str_iter)
|| !lit_char_is_octal_digit (lit_utf8_iterator_peek_next (&source_str_iter)))) || !lit_char_is_octal_digit (lit_utf8_iterator_peek_next (&source_str_iter))))
{
if (!lit_utf8_iterator_is_eos (&source_str_iter))
{ {
lit_utf8_iterator_incr (&source_str_iter); lit_utf8_iterator_incr (&source_str_iter);
}
converted_char = LIT_CHAR_NULL; converted_char = LIT_CHAR_NULL;
} }
@@ -637,9 +640,12 @@ new_token (void)
static void static void
consume_char (void) consume_char (void)
{
if (!lit_utf8_iterator_is_eos (&src_iter))
{ {
lit_utf8_iterator_incr (&src_iter); lit_utf8_iterator_incr (&src_iter);
} }
}
#define RETURN_PUNC_EX(TOK, NUM) \ #define RETURN_PUNC_EX(TOK, NUM) \
do \ do \