mirror of
https://github.com/johnkerl/miller.git
synced 2026-07-24 00:18:39 +00:00
neaten
This commit is contained in:
parent
a1d02b0980
commit
fd941cffde
2 changed files with 38 additions and 1 deletions
|
|
@ -279,6 +279,42 @@ static mlr_dsl_cst_t* mlr_dsl_cst_alloc_from_ast(mlr_dsl_ast_t* past, int type_i
|
|||
return pcst;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------
|
||||
// begin {}
|
||||
// end {}
|
||||
// ----------------------------------------------------------------
|
||||
// cond-expr {}
|
||||
// while (expr) {}
|
||||
// for (k, v in $*) {}
|
||||
// for (k1, k2, v in @v["a"]) {}
|
||||
// if (expr) {} elif (expr) {} elif (expr) else {}
|
||||
// $srec = RHS
|
||||
// @v["a"] = $*
|
||||
// $* = @v["a"]
|
||||
// bare-boolean
|
||||
// @v["a"] = RHS
|
||||
// filter
|
||||
// unset
|
||||
// emitf
|
||||
// emitp
|
||||
// emit
|
||||
// dump
|
||||
// break
|
||||
// continue
|
||||
|
||||
// LHS:
|
||||
// * pfunc
|
||||
// * srec_lhs_field_name
|
||||
// * poosvar_lhs_keylist_evaluators
|
||||
// * poosvar_lhs_namelist_evaluators
|
||||
// * all_flag
|
||||
// * prhs_evaluator
|
||||
// * pbody_statements: cond, while, for
|
||||
// * poosvar_rhs_keylist_evaluators
|
||||
// * if-elif-elif-else -- ???
|
||||
// * for-srec -- ???
|
||||
// * for-oosvar -- ???
|
||||
|
||||
// ----------------------------------------------------------------
|
||||
void mlr_dsl_cst_free(mlr_dsl_cst_t* pcst) {
|
||||
if (pcst == NULL)
|
||||
|
|
|
|||
|
|
@ -60,8 +60,9 @@ typedef void mlr_dsl_cst_node_evaluator_func_t(
|
|||
typedef struct _mlr_dsl_cst_statement_item_t {
|
||||
// LHS:
|
||||
char* output_field_name;
|
||||
// E.g. emit @a[$b]["c"], "d", @e: keylist is [$b, "c"] and namelist is ["d", @e].
|
||||
sllv_t* poosvar_lhs_keylist_evaluators;
|
||||
sllv_t* poosvar_lhs_namelist_evaluators;
|
||||
sllv_t* poosvar_lhs_namelist_evaluators; // for emit
|
||||
int all_flag; // for emit all and unset all
|
||||
|
||||
// RHS:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue