ruby/yarp/node.h
Jemma Issroff cc7f765f2c [Feature #19741] Sync all files in yarp
This commit is the initial sync of all files from ruby/yarp
into ruby/ruby. Notably, it does the following:

* Sync all ruby/yarp/lib/ files to ruby/ruby/lib/yarp
* Sync all ruby/yarp/src/ files to ruby/ruby/yarp/
* Sync all ruby/yarp/test/ files to ruby/ruby/test/yarp
2023-06-21 11:25:39 -07:00

21 lines
648 B
C

#ifndef YARP_NODE_H
#define YARP_NODE_H
#include "yarp/defines.h"
#include "yarp.h"
#include "yarp/parser.h"
// Append a token to the given list.
void yp_location_list_append(yp_location_list_t *list, const yp_token_t *token);
// Append a new node onto the end of the node list.
void yp_node_list_append(yp_node_list_t *list, yp_node_t *node);
// Clear the node but preserves the location.
void yp_node_clear(yp_node_t *node);
#define YP_EMPTY_NODE_LIST ((yp_node_list_t) { .nodes = NULL, .size = 0, .capacity = 0 })
#define YP_EMPTY_LOCATION_LIST ((yp_location_list_t) { .locations = NULL, .size = 0, .capacity = 0 })
#endif // YARP_NODE_H