Skip to content

Commit 841e21a

Browse files
authored
Generate parser error messages (#4836)
Support parser error messages generation in tools/gen-strings.py. JerryScript-DCO-1.0-Signed-off-by: Csaba Repasi [email protected]
1 parent 271d9b2 commit 841e21a

File tree

10 files changed

+567
-716
lines changed

10 files changed

+567
-716
lines changed

jerry-core/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,7 @@ set(SOURCE_CORE_FILES
317317
parser/js/js-scanner-ops.c
318318
parser/js/js-scanner-util.c
319319
parser/js/js-scanner.c
320+
parser/js/parser-errors.c
320321
parser/regexp/re-bytecode.c
321322
parser/regexp/re-compiler.c
322323
parser/regexp/re-parser.c

jerry-core/parser/js/js-parser-internal.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
#include "js-parser-limits.h"
2626
#include "js-parser.h"
2727
#include "js-scanner.h"
28+
#include "parser-errors.h"
2829

2930
/** \addtogroup parser Parser
3031
* @{
@@ -533,7 +534,7 @@ typedef struct parser_saved_context_t
533534
typedef struct
534535
{
535536
PARSER_TRY_CONTEXT (try_buffer); /**< try_buffer */
536-
parser_error_t error; /**< error code */
537+
parser_error_msg_t error; /**< error code */
537538
/** Union for rarely used members. */
538539
union
539540
{
@@ -923,7 +924,7 @@ uint16_t parser_check_anonymous_function_declaration (parser_context_t *context_
923924

924925
/* Error management. */
925926

926-
void parser_raise_error (parser_context_t *context_p, parser_error_t error);
927+
void parser_raise_error (parser_context_t *context_p, parser_error_msg_t error);
927928

928929
/* Debug functions. */
929930

0 commit comments

Comments
 (0)