summaryrefslogtreecommitdiffstats
path: root/src/eval.h
diff options
context:
space:
mode:
authorCosta Tsaousis <costa@tsaousis.gr>2016-08-25 01:38:00 +0300
committerCosta Tsaousis <costa@tsaousis.gr>2016-08-25 01:38:00 +0300
commit54e87bf0c757e855bfe931c09fcd5318db679596 (patch)
treeaedb959527de24d1ccd54d9282c4b91368aa1c59 /src/eval.h
parent4f048151c414c07af0184130b44002b79f6905b1 (diff)
added inline conditional evaluation, C and javascript like: (condition)?(true expression):(false expression) - made check of nan values work
Diffstat (limited to 'src/eval.h')
-rw-r--r--src/eval.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/eval.h b/src/eval.h
index c1f049ce40..b509a9fa83 100644
--- a/src/eval.h
+++ b/src/eval.h
@@ -15,6 +15,9 @@ typedef struct eval_expression {
const char *parsed_as;
calculated_number *this;
+ time_t *after;
+ time_t *before;
+
calculated_number result;
int error;
@@ -41,6 +44,7 @@ typedef struct eval_expression {
#define EVAL_ERROR_MISSING_OPERAND 3
#define EVAL_ERROR_MISSING_OPERATOR 4
#define EVAL_ERROR_REMAINING_GARBAGE 5
+#define EVAL_ERROR_IF_THEN_ELSE_MISSING_ELSE 6
// evaluation errors
#define EVAL_ERROR_INVALID_VALUE 101