Print error messages to be more informative

JerryScript-DCO-1.0-Signed-off-by: László Langó llango.u-szeged@partner.samsung.com
This commit is contained in:
László Langó
2016-03-01 15:43:16 +01:00
parent 212aa34331
commit a187e6d60c
11 changed files with 170 additions and 58 deletions
+9 -5
View File
@@ -135,16 +135,20 @@ typedef enum
{
JSP_STATUS_OK, /**< parse finished successfully, no early errors occured */
JSP_STATUS_SYNTAX_ERROR, /**< SyntaxError early error occured */
JSP_STATUS_REFERENCE_ERROR /**< ReferenceError early error occured */
} jsp_status_t;
extern void parser_set_show_instrs (int);
/* Note: source must be a valid UTF-8 string */
extern jsp_status_t parser_parse_script (const jerry_api_char_t *, size_t,
ecma_compiled_code_t **);
extern jsp_status_t parser_parse_eval (const jerry_api_char_t *, size_t, bool,
ecma_compiled_code_t **);
extern jsp_status_t parser_parse_script (const jerry_api_char_t *,
size_t,
ecma_compiled_code_t **,
jerry_api_object_t **);
extern jsp_status_t parser_parse_eval (const jerry_api_char_t *,
size_t,
bool,
ecma_compiled_code_t **,
jerry_api_object_t **);
const char *parser_error_to_string (parser_error_t);