cex: isolate missing API from gl_list

* src/counterexample.c (list_get_end): New.
Use it.
Reduce scopes.
This commit is contained in:
Akim Demaille
2020-05-16 10:41:06 +02:00
parent e0cb91a922
commit da5317cc9d
2 changed files with 30 additions and 9 deletions

13
TODO
View File

@@ -1,4 +1,17 @@
* Bison 3.7
** Cex
Don't do this (counterexample.c):
// This is the fastest way to get the tail node from the gl_list API.
gl_list_node_t
list_get_end (gl_list_t list)
{
gl_list_node_t sentinel = gl_list_add_last (list, NULL);
gl_list_node_t res = gl_list_previous_node (list, sentinel);
gl_list_remove_node (list, sentinel);
return res;
}
** Bistromathic
- Hitting tab on a line with a syntax error is ugly