X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=lib%2Fecoli_node_expr.h;h=4f21d81128fab91563b6e1f91a44149137577489;hb=15718f19cbf3868bf6fba79f4e26b5254c57873e;hp=3f7b5617243f0b7b6bcad2ac0957fcaccb90d78b;hpb=7cbb8a1000b85db2a487afd4d17e688b8c0aa756;p=protos%2Flibecoli.git diff --git a/lib/ecoli_node_expr.h b/lib/ecoli_node_expr.h index 3f7b561..4f21d81 100644 --- a/lib/ecoli_node_expr.h +++ b/lib/ecoli_node_expr.h @@ -1,5 +1,5 @@ /* SPDX-License-Identifier: BSD-3-Clause - * Copyright (c) 2016, Olivier MATZ + * Copyright 2016, Olivier MATZ */ #ifndef ECOLI_NODE_EXPR_ @@ -7,8 +7,6 @@ #include -/* XXX remove the _new for all other nodes */ - /** * Callback function type for evaluating a variable * @@ -19,14 +17,14 @@ * A user-defined context passed to all callback functions, which * can be used to maintain a state or store global information. * @param var - * The parsed result referencing the variable. + * The parse result referencing the variable. * @return * 0 on success (*result must be set), or -errno on error (*result * is undefined). */ typedef int (*ec_node_expr_eval_var_t)( void **result, void *userctx, - const struct ec_parsed *var); + const struct ec_parse *var); /** * Callback function type for evaluating a prefix-operator @@ -40,7 +38,7 @@ typedef int (*ec_node_expr_eval_var_t)( * @param operand * The evaluated expression on which the operation should be applied. * @param var - * The parsed result referencing the operator. + * The parse result referencing the operator. * @return * 0 on success (*result must be set, operand is freed), * or -errno on error (*result is undefined, operand is not freed). @@ -48,23 +46,23 @@ typedef int (*ec_node_expr_eval_var_t)( typedef int (*ec_node_expr_eval_pre_op_t)( void **result, void *userctx, void *operand, - const struct ec_parsed *operator); + const struct ec_parse *operator); typedef int (*ec_node_expr_eval_post_op_t)( void **result, void *userctx, void *operand, - const struct ec_parsed *operator); + const struct ec_parse *operator); typedef int (*ec_node_expr_eval_bin_op_t)( void **result, void *userctx, void *operand1, - const struct ec_parsed *operator, + const struct ec_parse *operator, void *operand2); typedef int (*ec_node_expr_eval_parenthesis_t)( void **result, void *userctx, - const struct ec_parsed *open_paren, - const struct ec_parsed *close_paren, + const struct ec_parse *open_paren, + const struct ec_parse *close_paren, void * value); typedef void (*ec_node_expr_eval_free_t)( @@ -89,7 +87,7 @@ struct ec_node_expr_eval_ops { }; int ec_node_expr_eval(void **result, const struct ec_node *node, - struct ec_parsed *parsed, const struct ec_node_expr_eval_ops *ops, + struct ec_parse *parse, const struct ec_node_expr_eval_ops *ops, void *userctx); #endif