Change locus type from size_t to lit_utf8_iterator_pos_t.

JerryScript-DCO-1.0-Signed-off-by: Andrey Shitov a.shitov@samsung.com
This commit is contained in:
Andrey Shitov
2015-07-05 23:13:12 +03:00
committed by Ruben Ayrapetyan
parent 7dd1d01541
commit 146ac15b5f
7 changed files with 177 additions and 139 deletions
+5 -3
View File
@@ -23,7 +23,7 @@
#ifndef JERRY_NDEBUG
#define PARSE_ERROR_PRINT_PLACE(TYPE, LOCUS) do { \
size_t line, column; \
lexer_locus_to_line_and_column ((locus) (LOCUS), &line, &column); \
lexer_locus_to_line_and_column ((LOCUS), &line, &column); \
lexer_dump_line (line); \
printf ("\n"); \
for (size_t i = 0; i < column; i++) { \
@@ -33,12 +33,14 @@
printf ("%s: Ln %lu, Col %lu: ", TYPE, (unsigned long) (line + 1), (unsigned long) (column + 1)); \
} while (0)
#define PARSE_ERROR(MESSAGE, LOCUS) do { \
PARSE_ERROR_PRINT_PLACE ("ERROR", LOCUS); \
locus __loc = LOCUS; \
PARSE_ERROR_PRINT_PLACE ("ERROR", __loc); \
printf ("%s\n", MESSAGE); \
syntax_raise_error (); \
} while (0)
#define PARSE_ERROR_VARG(MESSAGE, LOCUS, ...) do { \
PARSE_ERROR_PRINT_PLACE ("ERROR", LOCUS); \
locus __loc = LOCUS; \
PARSE_ERROR_PRINT_PLACE ("ERROR", __loc); \
printf (MESSAGE, __VA_ARGS__); \
printf ("\n"); \
syntax_raise_error (); \