summaryrefslogtreecommitdiff
path: root/yarp/node.h
diff options
context:
space:
mode:
authorKevin Newton <kddnewton@gmail.com>2023-09-05 12:34:16 -0400
committergit <svn-admin@ruby-lang.org>2023-09-05 18:41:51 +0000
commitc384ef07991d08dc378bf6450363aaa654099813 (patch)
treeefdfd50f40e851765fa1680c39ca7f27a077dc2e /yarp/node.h
parent9a8398a18f364d3bcfc8d2744162d3572d9491e4 (diff)
[ruby/yarp] Introduce a BlockLocalVariableNode
This is a tradeoff that I think is worth it. Right now we have a location list that tracks the location of each of the block locals. Instead, I'd like to make that a node list that has a proper node in each spot in the list. In doing so, we eliminate the need to have a location list at all, making it simpler on all of the various consumers as we have one fewer field type. There should be minimal memory implications here since this syntax is exceedingly rare. https://github.com/ruby/yarp/commit/04d329ddf0
Diffstat (limited to 'yarp/node.h')
-rw-r--r--yarp/node.h4
1 files changed, 0 insertions, 4 deletions
diff --git a/yarp/node.h b/yarp/node.h
index f2d5be8bf2..1b546f086f 100644
--- a/yarp/node.h
+++ b/yarp/node.h
@@ -4,9 +4,6 @@
#include "yarp/defines.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);
@@ -31,7 +28,6 @@ YP_EXPORTED_FUNCTION void yp_node_memsize(yp_node_t *node, yp_memsize_t *memsize
YP_EXPORTED_FUNCTION const char * yp_node_type_to_str(yp_node_type_t node_type);
#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