aboutsummaryrefslogtreecommitdiff
path: root/src/ls_expr.h
blob: 9ecbfe8d4d022c8e1a79412312364ce0d4cae05f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
// This software disclaims copyright. Do what you want with it. Be gay, do
// crime. Originally written by Alexis Lockwood in 2021. Ⓐ

#ifndef LS_EXPR_H
#define LS_EXPR_H

// --- DEPENDENCIES ------------------------------------------------------------

// Supporting modules
#include "ls.h"
#include "ls_internal.h"

// Standard headers
#include <stdbool.h>
#include <stddef.h>
#include <inttypes.h>

// --- PUBLIC MACROS -----------------------------------------------------------
// --- PRIVATE DATATYPES -------------------------------------------------------
// --- PUBLIC DATATYPES --------------------------------------------------------
// --- PUBLIC CONSTANTS --------------------------------------------------------
// --- PUBLIC VARIABLES --------------------------------------------------------
// --- PUBLIC FUNCTIONS --------------------------------------------------------

/// Parse and evaluate an expression. Any errors are raised.
///
/// @param ctx
/// @param val - outparam for the resulting value
/// @param tok - optional first token to be included. NULL if none.
void ls_eval_expr(ls_context_t * ctx, ls_value_t * val, ls_token_t * firsttok);

#endif // !defined(LS_EXPR_H)