Expose lower stack nodes via pop_until() function
This callback-based API allows the parser to easily visit each interior node of the stack when searching for an error repair. It also is a better abstraction over the stack's DAG implementation than having the public functions for accessing entries and their successor entries.
This commit is contained in:
parent
bc8df9f5c5
commit
4348eb89d4
9 changed files with 417 additions and 295 deletions
|
|
@ -21,6 +21,9 @@ extern "C" {
|
|||
#define array_init(self) \
|
||||
((self)->size = 0, (self)->capacity = 0, (self)->contents = NULL)
|
||||
|
||||
#define array_new() \
|
||||
{ NULL, 0, 0 }
|
||||
|
||||
#define array_get(self, index) \
|
||||
(assert((size_t)index < (self)->size), &(self)->contents[index])
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue