Implement number evaluation
This commit is contained in:
8
lib/evaluator.c
Normal file
8
lib/evaluator.c
Normal file
@@ -0,0 +1,8 @@
|
||||
#include "evaluator.h"
|
||||
|
||||
int evaluate(const expression_t *expression)
|
||||
{
|
||||
if (expression->is_number)
|
||||
return expression->number;
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user