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:
committed by
Ruben Ayrapetyan
parent
7dd1d01541
commit
146ac15b5f
@@ -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 (); \
|
||||
|
||||
Reference in New Issue
Block a user