parser_parse_initializer_by_next_char (parser_context_t *context_p, /**< context */
                                       parser_pattern_flags_t flags) /**< flags */
{
  JERRY_ASSERT (lexer_check_next_characters (context_p, LIT_CHAR_LEFT_SQUARE, LIT_CHAR_LEFT_BRACE));

  if (lexer_consume_next_character (context_p) == LIT_CHAR_LEFT_BRACE)
  {
    if (context_p->next_scanner_info_p->source_p == context_p->source_p)
    {
      JERRY_ASSERT (context_p->next_scanner_info_p->type == SCANNER_TYPE_INITIALIZER
                    || context_p->next_scanner_info_p->type == SCANNER_TYPE_LITERAL_FLAGS);

      if (context_p->next_scanner_info_p->u8_arg & SCANNER_LITERAL_OBJECT_HAS_REST)
      {
        flags |= PARSER_PATTERN_HAS_REST_ELEMENT;
      }

      if (context_p->next_scanner_info_p->type == SCANNER_TYPE_LITERAL_FLAGS)
      {
        scanner_release_next (context_p, sizeof (scanner_info_t));
      }
    }

    parser_parse_object_initializer (context_p, flags);
  }
  else
  {
    parser_parse_array_initializer (context_p, flags);
  }
} /* parser_parse_initializer_by_next_char */
parser_parse_initializer_by_next_char (parser_context_t *context_p,  
                                       parser_pattern_flags_t flags)  
{
  JERRY_ASSERT (lexer_check_next_characters (context_p, LIT_CHAR_LEFT_SQUARE, LIT_CHAR_LEFT_BRACE));

  if (lexer_consume_next_character (context_p) == LIT_CHAR_LEFT_BRACE)
  {
    if (context_p->next_scanner_info_p->source_p == context_p->source_p)
    {
      JERRY_ASSERT (context_p->next_scanner_info_p->type == SCANNER_TYPE_INITIALIZER
                    || context_p->next_scanner_info_p->type == SCANNER_TYPE_LITERAL_FLAGS);

      if (context_p->next_scanner_info_p->u8_arg & SCANNER_LITERAL_OBJECT_HAS_REST)
      {
        flags |= PARSER_PATTERN_HAS_REST_ELEMENT;
      }

      if (context_p->next_scanner_info_p->type == SCANNER_TYPE_LITERAL_FLAGS)
      {
        scanner_release_next (context_p, sizeof (scanner_info_t));
      }
    }

    parser_parse_object_initializer (context_p, flags);
  }
  else
  {
    parser_parse_array_initializer (context_p, flags);
  }
}  