parser/src/LinkedListAPI.c
void insertFront(List* list, void* toBeAdded){
	if (list == NULL || toBeAdded == NULL){
		return;
	}
	
	(list->length)++;

	Node* newNode = initializeNode(toBeAdded);
	
    if (list->head == NULL && list->tail == NULL){
        list->head = newNode;
        list->tail = list->head;
    }else{
		newNode->next = list->head;
        list->head->previous = newNode;
    	list->head = newNode;
    }
}
/**Inserts a Node at the front of a linked list.  List metadata is updated
* so that head and tail pointers are correct.
*@pre 'List' type must exist and be used in order to keep track of the linked list.
*@param list pointer to the dummy head of the list
*@param toBeAdded a pointer to data that is to be added to the linked list
**/
Inserts a Node at the front of a linked list.  List metadata is updated
so that head and tail pointers are correct.
Inserts a Node at the front of a linked list . List metadata is updated so that head and tail pointers are correct .
void insertFront(List* list, void* toBeAdded){
	if (list == NULL || toBeAdded == NULL){
		return;
	}
	(list->length)++;
	Node* newNode = initializeNode(toBeAdded);
    if (list->head == NULL && list->tail == NULL){
        list->head = newNode;
        list->tail = list->head;
    }else{
		newNode->next = list->head;
        list->head->previous = newNode;
    	list->head = newNode;
    }
}
void insertFront ( List * list , void * toBeAdded ) { if ( list == NULL || toBeAdded == NULL ) { return ; } ( list -> length ) ++ ; Node * newNode = initializeNode ( toBeAdded ) ; if ( list -> head == NULL && list -> tail == NULL ) { list -> head = newNode ; list -> tail = list -> head ; } else { newNode -> next = list -> head ; list -> head -> previous = newNode ; list -> head = newNode ; } }
Inserts a Node at the front of a linked list.
Inserts a Node at the front of a linked list .