view src/preprocess.h @ 139:d320f32169ee

preprocess: Overhaul preprocessing and implement reference resolution
author Lewin Bormann <lbo@spheniscida.de>
date Tue, 03 Sep 2019 09:41:17 +0200
parents 75ed83d94261
children 15825a4a3580
line wrap: on
line source

#ifndef src_preprocess_h
#define src_preprocess_h

#include "types.h"

/**
 * @file preprocess.h
 * @brief Preprocess a parsed expression tree.
 * @addtogroup frontend
 * @{
 */

/**
 * @brief Apply preprocessing stages, listed as individual functions below.
 */
void ypreprocess(yexpr_t* expr);

/**
 * @brief Replace IDs that reference a built-in by built-in expressions.
 *
 * Run order: 1
 */
void ypreprocess_resolve_builtins(yexpr_t* expr);

/**
 * @brief Replace symbolic IDs with per-scope-unique numeric IDs.
 *
 * Run order: 2
 */
void ypreprocess_refs(yexpr_t* expr);

/**
 * @}
 */

#endif