From 316223ebdbdd18e99efa180511c2689a677518e0 Mon Sep 17 00:00:00 2001 From: Akos Kiss Date: Wed, 21 Sep 2016 10:43:40 +0200 Subject: [PATCH] Fix doxygen-related documentation issues (#1357) JerryScript-DCO-1.0-Signed-off-by: Akos Kiss akiss@inf.u-szeged.hu --- .../ecma-builtin-helpers-error.c | 2 +- .../ecma-builtin-helpers-json.c | 2 +- .../ecma/operations/ecma-get-put-value.c | 2 +- .../ecma/operations/ecma-objects-general.c | 2 +- jerry-core/ecma/operations/ecma-objects.c | 2 +- jerry-core/jcontext/jcontext.c | 6 +- jerry-core/jcontext/jcontext.h | 6 +- jerry-core/jerry.c | 2 +- jerry-core/parser/js/js-parser-internal.h | 68 ++++++++++++++++++- 9 files changed, 74 insertions(+), 18 deletions(-) diff --git a/jerry-core/ecma/builtin-objects/ecma-builtin-helpers-error.c b/jerry-core/ecma/builtin-objects/ecma-builtin-helpers-error.c index dee738b15..19e3d8146 100644 --- a/jerry-core/ecma/builtin-objects/ecma-builtin-helpers-error.c +++ b/jerry-core/ecma/builtin-objects/ecma-builtin-helpers-error.c @@ -29,7 +29,7 @@ /** \addtogroup ecma ECMA * @{ * - * \addtogroup ecmabuiltinhelpers + * \addtogroup ecmabuiltinhelpers ECMA builtin helper operations * @{ */ diff --git a/jerry-core/ecma/builtin-objects/ecma-builtin-helpers-json.c b/jerry-core/ecma/builtin-objects/ecma-builtin-helpers-json.c index b7553f061..83fc15471 100644 --- a/jerry-core/ecma/builtin-objects/ecma-builtin-helpers-json.c +++ b/jerry-core/ecma/builtin-objects/ecma-builtin-helpers-json.c @@ -22,7 +22,7 @@ /** \addtogroup ecma ECMA * @{ * - * \addtogroup ecmahelpers Helpers for operations with ECMA data types + * \addtogroup ecmabuiltinhelpers ECMA builtin helper operations * @{ */ diff --git a/jerry-core/ecma/operations/ecma-get-put-value.c b/jerry-core/ecma/operations/ecma-get-put-value.c index 703e299a3..6bdc170c5 100644 --- a/jerry-core/ecma/operations/ecma-get-put-value.c +++ b/jerry-core/ecma/operations/ecma-get-put-value.c @@ -31,7 +31,7 @@ /** \addtogroup ecma ECMA * @{ * - * \addtogroup ecmaoperations ECMA-defined operations + * \addtogroup lexicalenvironment Lexical environment * @{ */ diff --git a/jerry-core/ecma/operations/ecma-objects-general.c b/jerry-core/ecma/operations/ecma-objects-general.c index b922edbaf..b0c0956ac 100644 --- a/jerry-core/ecma/operations/ecma-objects-general.c +++ b/jerry-core/ecma/operations/ecma-objects-general.c @@ -27,7 +27,7 @@ /** \addtogroup ecma ECMA * @{ * - * \addtogroup ecmageneralobjectsinternalops General ECMA objects' operations + * \addtogroup ecmaobjectsinternalops ECMA objects' operations * @{ */ diff --git a/jerry-core/ecma/operations/ecma-objects.c b/jerry-core/ecma/operations/ecma-objects.c index 99c28f5eb..9ef463c05 100644 --- a/jerry-core/ecma/operations/ecma-objects.c +++ b/jerry-core/ecma/operations/ecma-objects.c @@ -43,7 +43,7 @@ /** * Assert that specified object type value is valid * - * @param object's implementation-defined type + * @param type object's implementation-defined type */ #ifndef JERRY_NDEBUG #define JERRY_ASSERT_OBJECT_TYPE_IS_VALID(type) \ diff --git a/jerry-core/jcontext/jcontext.c b/jerry-core/jcontext/jcontext.c index 38c6878ed..29d2781ef 100644 --- a/jerry-core/jcontext/jcontext.c +++ b/jerry-core/jcontext/jcontext.c @@ -16,10 +16,7 @@ #include "jcontext.h" -/** \addtogroup context Jerry context - * @{ - * - * \addtogroup context Context +/** \addtogroup context Context * @{ */ @@ -52,6 +49,5 @@ jerry_hash_table_t jerry_global_hash_table; #endif /* !CONFIG_ECMA_LCACHE_DISABLE */ /** - * @} * @} */ diff --git a/jerry-core/jcontext/jcontext.h b/jerry-core/jcontext/jcontext.h index 092711067..3ffca35cb 100644 --- a/jerry-core/jcontext/jcontext.h +++ b/jerry-core/jcontext/jcontext.h @@ -26,10 +26,7 @@ #include "re-bytecode.h" #include "vm-defines.h" -/** \addtogroup context Jerry context - * @{ - * - * \addtogroup context Context +/** \addtogroup context Context * @{ */ @@ -167,7 +164,6 @@ extern jerry_hash_table_t jerry_global_hash_table; #endif /* !CONFIG_ECMA_LCACHE_DISABLE */ /** - * @} * @} */ diff --git a/jerry-core/jerry.c b/jerry-core/jerry.c index d5ee45af3..926508969 100644 --- a/jerry-core/jerry.c +++ b/jerry-core/jerry.c @@ -65,7 +65,7 @@ static const char * const wrong_args_msg_p = "wrong type of argument"; #endif /* JERRY_ENABLE_ERROR_MESSAGES */ -/** \addtogroup jerry_extension Jerry engine extension interface +/** \addtogroup jerry Jerry engine interface * @{ */ diff --git a/jerry-core/parser/js/js-parser-internal.h b/jerry-core/parser/js/js-parser-internal.h index 90e4fe943..433c7bbe1 100644 --- a/jerry-core/parser/js/js-parser-internal.h +++ b/jerry-core/parser/js/js-parser-internal.h @@ -273,6 +273,18 @@ typedef struct #endif /* PARSER_DUMP_BYTE_CODE */ } parser_context_t; +/** + * @} + * @} + * @} + * + * \addtogroup mem Memory allocation + * @{ + * + * \addtogroup mem_parser Parser memory manager + * @{ + */ + /* Memory management. * Note: throws an error if unsuccessful. */ void *parser_malloc (parser_context_t *, size_t); @@ -311,6 +323,20 @@ void parser_stack_iterator_skip (parser_stack_iterator_t *, size_t); void parser_stack_iterator_read (parser_stack_iterator_t *, void *, size_t); void parser_stack_iterator_write (parser_stack_iterator_t *, const void *, size_t); +/** + * @} + * @} + * + * \addtogroup parser Parser + * @{ + * + * \addtogroup jsparser JavaScript + * @{ + * + * \addtogroup jsparser_utils Utility + * @{ + */ + /* Compact byte code emitting functions. */ void parser_flush_cbc (parser_context_t *); @@ -338,6 +364,13 @@ void parser_set_continues_to_current_position (parser_context_t *, parser_branch #define parser_emit_cbc_ext_backward_branch(context_p, opcode, offset) \ parser_emit_cbc_backward_branch ((context_p), PARSER_TO_EXT_OPCODE (opcode), (offset)) +/** + * @} + * + * \addtogroup jsparser_lexer Lexer + * @{ + */ + /* Lexer functions */ void lexer_next_token (parser_context_t *); @@ -351,14 +384,45 @@ void lexer_construct_function_object (parser_context_t *, uint32_t); void lexer_construct_regexp_object (parser_context_t *, bool); bool lexer_compare_identifier_to_current (parser_context_t *, const lexer_lit_location_t *); +/** + * @} + * + * \addtogroup jsparser_expr Expression parser + * @{ + */ + /* Parser functions. */ void parser_parse_expression (parser_context_t *, int); -void parser_parse_statements (parser_context_t *); + +/** + * @} + * + * \addtogroup jsparser_scanner Scanner + * @{ + */ + void parser_scan_until (parser_context_t *, lexer_range_t *, lexer_token_type_t); -ecma_compiled_code_t *parser_parse_function (parser_context_t *, uint32_t); + +/** + * @} + * + * \addtogroup jsparser_stmt Statement parser + * @{ + */ + +void parser_parse_statements (parser_context_t *); void parser_free_jumps (parser_stack_iterator_t); +/** + * @} + * + * \addtogroup jsparser_parser Parser + * @{ + */ + +ecma_compiled_code_t *parser_parse_function (parser_context_t *, uint32_t); + /* Error management. */ void parser_raise_error (parser_context_t *, parser_error_t);