mirror of
https://github.com/johnkerl/miller.git
synced 2026-07-22 07:30:43 +00:00
unset iterate
This commit is contained in:
parent
e175bffe56
commit
2ed3ec329b
4 changed files with 4 additions and 13 deletions
|
|
@ -431,7 +431,7 @@ static void mlhmmv_level_enlarge(mlhmmv_level_t* plevel) {
|
|||
// xxx temp
|
||||
#define TEMP_FLATTEN_SEP ":"
|
||||
|
||||
void mlhmmv_to_lrecs(mlhmmv_t* pmap, sllmv_t* psubmap_indices, sllmv_t* pnames, sllv_t* poutrecs) {
|
||||
void mlhmmv_to_lrecs(mlhmmv_t* pmap, sllmv_t* pnames, sllv_t* poutrecs) {
|
||||
lrec_t* ptemplate = lrec_unbacked_alloc();
|
||||
if (pnames->phead == NULL) {
|
||||
fprintf(stderr, "%s: internal coding error detected in file %s at line %d\n",
|
||||
|
|
|
|||
|
|
@ -85,10 +85,9 @@ void mlhmmv_remove(mlhmmv_t* pmap, mv_t* pname_key, sllmv_t* pmvkeys);
|
|||
mlhmmv_level_entry_t* mlhmmv_get_next_level_entry(mlhmmv_level_t* pmap, mv_t* plevel_key, int* pindex);
|
||||
|
||||
// xxx comment:
|
||||
// * partial indices
|
||||
// * names
|
||||
// * these allocate unbacked lrecs
|
||||
void mlhmmv_to_lrecs(mlhmmv_t* pmap, sllmv_t* psubmap_indices, sllmv_t* pnames, sllv_t* poutrecs);
|
||||
void mlhmmv_to_lrecs(mlhmmv_t* pmap, sllmv_t* pnames, sllv_t* poutrecs);
|
||||
|
||||
void mlhmmv_print_json_stacked(mlhmmv_t* pmap, int quote_values_always);
|
||||
void mlhmmv_print_json_single_line(mlhmmv_t* pmap, int quote_values_always);
|
||||
|
|
|
|||
|
|
@ -506,14 +506,6 @@ md_emit(A) ::= MD_TOKEN_EMIT(O) md_oosvar_name(B) MD_TOKEN_COMMA md_emit_args(C)
|
|||
A = mlr_dsl_ast_node_set_function_name(B, O->text);
|
||||
}
|
||||
|
||||
md_emit(A) ::= MD_TOKEN_EMIT(O) md_keyed_oosvar_name(B). {
|
||||
A = mlr_dsl_ast_node_alloc_unary(O->text, MD_AST_NODE_TYPE_EMIT, B);
|
||||
}
|
||||
md_emit(A) ::= MD_TOKEN_EMIT(O) md_keyed_oosvar_name(B) MD_TOKEN_COMMA md_emit_args(C). {
|
||||
B = mlr_dsl_ast_node_prepend_arg(C, B);
|
||||
A = mlr_dsl_ast_node_set_function_name(B, O->text);
|
||||
}
|
||||
|
||||
md_emit_args(A) ::= md_rhs(B). {
|
||||
A = mlr_dsl_ast_node_alloc_unary("temp", MD_AST_NODE_TYPE_EMIT, B);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -395,7 +395,7 @@ static char* test_mlhmmv_to_lrecs() {
|
|||
// sllv_free(poutrecs);
|
||||
|
||||
poutrecs = sllv_alloc();
|
||||
mlhmmv_to_lrecs(pmap, sllmv_single(smv("a")), sllmv_single(smv("first")), poutrecs);
|
||||
mlhmmv_to_lrecs(pmap, sllmv_single(smv("first")), poutrecs);
|
||||
printf("outrecs (%lld):\n", poutrecs->length);
|
||||
for (sllve_t* pe = poutrecs->phead; pe != NULL; pe = pe->pnext)
|
||||
lrec_print(pe->pvvalue);
|
||||
|
|
@ -405,7 +405,7 @@ static char* test_mlhmmv_to_lrecs() {
|
|||
sllv_free(poutrecs);
|
||||
|
||||
poutrecs = sllv_alloc();
|
||||
mlhmmv_to_lrecs(pmap, sllmv_single(smv("a")), sllmv_double(smv("first"), smv("second")), poutrecs);
|
||||
mlhmmv_to_lrecs(pmap, sllmv_double(smv("first"), smv("second")), poutrecs);
|
||||
printf("outrecs (%lld):\n", poutrecs->length);
|
||||
for (sllve_t* pe = poutrecs->phead; pe != NULL; pe = pe->pnext)
|
||||
lrec_print(pe->pvvalue);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue