Set js-parser feature in the build script. (#1482)

Renamed FEATURE_PARSER_DISABLE to FEATURE_JS_PARSER.
Fixed the build error that occurred in case of disabled js-parser.

JerryScript-DCO-1.0-Signed-off-by: Robert Sipka rsipka.uszeged@partner.samsung.com
This commit is contained in:
Robert Sipka
2016-12-12 13:43:53 +01:00
committed by GitHub
parent 233b885ad8
commit e9ab1f14d3
13 changed files with 71 additions and 43 deletions
+2 -2
View File
@@ -15,7 +15,7 @@
#include "js-parser-internal.h"
#ifndef JERRY_DISABLE_PARSER
#ifdef JERRY_JS_PARSER
/** \addtogroup parser Parser
* @{
@@ -78,4 +78,4 @@ const char * const cbc_ext_names[] =
* @}
*/
#endif /* !JERRY_DISABLE_PARSER */
#endif /* JERRY_JS_PARSER */
+2 -2
View File
@@ -16,7 +16,7 @@
#include "common.h"
#include "ecma-helpers.h"
#ifndef JERRY_DISABLE_PARSER
#ifdef JERRY_JS_PARSER
/** \addtogroup parser Parser
* @{
@@ -136,4 +136,4 @@ util_print_literal (lexer_literal_t *literal_p) /**< literal */
* @}
*/
#endif /* !JERRY_DISABLE_PARSER */
#endif /* JERRY_JS_PARSER */
+2 -2
View File
@@ -20,7 +20,7 @@
#include "js-parser-internal.h"
#include "lit-char-helpers.h"
#ifndef JERRY_DISABLE_PARSER
#ifdef JERRY_JS_PARSER
/** \addtogroup parser Parser
* @{
@@ -2140,4 +2140,4 @@ lexer_compare_identifier_to_current (parser_context_t *context_p, /**< co
* @}
*/
#endif /* !JERRY_DISABLE_PARSER */
#endif /* JERRY_JS_PARSER */
+2 -2
View File
@@ -15,7 +15,7 @@
#include "js-parser-internal.h"
#ifndef JERRY_DISABLE_PARSER
#ifdef JERRY_JS_PARSER
/** \addtogroup parser Parser
* @{
@@ -1531,4 +1531,4 @@ parser_parse_expression (parser_context_t *context_p, /**< context */
* @}
*/
#endif /* !JERRY_DISABLE_PARSER */
#endif /* JERRY_JS_PARSER */
+2 -2
View File
@@ -15,7 +15,7 @@
#include "js-parser-internal.h"
#ifndef JERRY_DISABLE_PARSER
#ifdef JERRY_JS_PARSER
/** \addtogroup mem Memory allocation
* @{
@@ -678,4 +678,4 @@ parser_stack_iterator_write (parser_stack_iterator_t *iterator, /**< iterator */
* @}
*/
#endif /* !JERRY_DISABLE_PARSER */
#endif /* JERRY_JS_PARSER */
+2 -2
View File
@@ -15,7 +15,7 @@
#include "js-parser-internal.h"
#ifndef JERRY_DISABLE_PARSER
#ifdef JERRY_JS_PARSER
/** \addtogroup parser Parser
* @{
@@ -678,4 +678,4 @@ parser_scan_until (parser_context_t *context_p, /**< context */
* @}
*/
#endif /* !JERRY_DISABLE_PARSER */
#endif /* JERRY_JS_PARSER */
+2 -2
View File
@@ -15,7 +15,7 @@
#include "js-parser-internal.h"
#ifndef JERRY_DISABLE_PARSER
#ifdef JERRY_JS_PARSER
/** \addtogroup parser Parser
* @{
@@ -2146,4 +2146,4 @@ parser_free_jumps (parser_stack_iterator_t iterator) /**< iterator position */
* @}
*/
#endif /* !JERRY_DISABLE_PARSER */
#endif /* JERRY_JS_PARSER */
+2 -2
View File
@@ -15,7 +15,7 @@
#include "js-parser-internal.h"
#ifndef JERRY_DISABLE_PARSER
#ifdef JERRY_JS_PARSER
/** \addtogroup parser Parser
* @{
@@ -940,4 +940,4 @@ parser_error_to_string (parser_error_t error) /**< error code */
* @}
*/
#endif /* !JERRY_DISABLE_PARSER */
#endif /* JERRY_JS_PARSER */
+5 -5
View File
@@ -19,7 +19,7 @@
#include "jcontext.h"
#include "js-parser-internal.h"
#ifndef JERRY_DISABLE_PARSER
#ifdef JERRY_JS_PARSER
/** \addtogroup parser Parser
* @{
@@ -2230,7 +2230,7 @@ parser_raise_error (parser_context_t *context_p, /**< context */
#define PARSE_ERR_POS_END "]"
#define PARSE_ERR_POS_END_SIZE ((uint32_t) sizeof (PARSE_ERR_POS_END))
#endif /* !JERRY_DISABLE_PARSER */
#endif /* JERRY_JS_PARSER */
/**
* Parse EcamScript source code
@@ -2247,7 +2247,7 @@ parser_parse_script (const uint8_t *source_p, /**< source code */
bool is_strict, /**< strict mode */
ecma_compiled_code_t **bytecode_data_p) /**< [out] JS bytecode */
{
#ifndef JERRY_DISABLE_PARSER
#ifdef JERRY_JS_PARSER
parser_error_location_t parser_error;
*bytecode_data_p = parser_parse_source (source_p, size, is_strict, &parser_error);
@@ -2311,14 +2311,14 @@ parser_parse_script (const uint8_t *source_p, /**< source code */
#endif /* JERRY_ENABLE_ERROR_MESSAGES */
}
return ecma_make_simple_value (ECMA_SIMPLE_VALUE_TRUE);
#else /* !JERRY_DISABLE_PARSER */
#else /* !JERRY_JS_PARSER */
JERRY_UNUSED (source_p);
JERRY_UNUSED (size);
JERRY_UNUSED (is_strict);
JERRY_UNUSED (bytecode_data_p);
return ecma_raise_syntax_error (ECMA_ERR_MSG ("The parser has been disabled."));
#endif /* JERRY_DISABLE_PARSER */
#endif /* JERRY_JS_PARSER */
} /* parser_parse_script */
/**