This commit is contained in:
John Kerl 2016-02-18 23:44:25 -05:00
parent 58bf2f0ee2
commit b9d96a8cd3
2 changed files with 19 additions and 14 deletions

View file

@ -1,15 +1,6 @@
#ifndef RVAL_EVALUATOR_H
#define RVAL_EVALUATOR_H
#include "lib/context.h"
#include "containers/lrec.h"
#include "containers/lhmsv.h"
#include "containers/mlhmmv.h"
#include "containers/mlrval.h"
#include "lib/string_array.h"
struct _rval_evaluator_t; // forward reference for method declarations
// ================================================================
// These evaluate right-hand-side values (rvals) and return mlrvals (mv_t).
//
// Record state is in three parts here:
//
// * The lrec is read for input fields; output fields are written to the typed-overlay map. It is up to the
@ -31,7 +22,20 @@ struct _rval_evaluator_t; // forward reference for method declarations
//
// o It is up to mapper_put to write "left"=>"abc" and "right"=>"def" into the lrec.
//
// See also the comments above mapper_put.c for more information.
// See also the comments above mapper_put.c for more information about left-hand sides (lvals).
// ================================================================
#ifndef RVAL_EVALUATOR_H
#define RVAL_EVALUATOR_H
#include "lib/context.h"
#include "containers/lrec.h"
#include "containers/lhmsv.h"
#include "containers/mlhmmv.h"
#include "containers/mlrval.h"
#include "lib/string_array.h"
struct _rval_evaluator_t; // forward reference for method declarations
typedef mv_t rval_evaluator_process_func_t(
lrec_t* prec, lhmsv_t* ptyped_overlay, mlhmmv_t* poosvars,

View file

@ -12,6 +12,8 @@
// ================================================================
// NOTES:
//
// * Code here evaluates right-hand-side values (rvals) and return mlrvals (mv_t).
//
// * This is used by mlr filter and mlr put.
//
// * Unlike most files in Miller which are read top-down (with sufficient
@ -1932,7 +1934,6 @@ rval_evaluator_t* rval_evaluator_alloc_from_zary_func_name(char* function_name)
}
// ================================================================
typedef enum _func_class_t {
FUNC_CLASS_ARITHMETIC,
FUNC_CLASS_MATH,