Merge the js-parser and parser files

JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
This commit is contained in:
Robert Sipka
2016-02-09 14:00:04 +01:00
committed by László Langó
parent 41f2f910e8
commit b0bdf0ebf4
7 changed files with 66 additions and 135 deletions
+18 -2
View File
@@ -128,8 +128,24 @@ typedef struct
parser_line_counter_t column; /**< column where the error occured */
} parser_error_location;
/* Note: source must be a valid UTF-8 string. */
ecma_compiled_code_t * parser_parse_script (const uint8_t *, size_t, int, parser_error_location *);
/**
* Parser completion status
*/
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 **);
const char *parser_error_to_string (parser_error_t);
extern void parser_set_show_instrs (int);