-
Notifications
You must be signed in to change notification settings - Fork 6
/
supercalc.h
37 lines (27 loc) · 805 Bytes
/
supercalc.h
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
33
34
35
36
37
/*
supercalc.h
SuperCalc
Created by C0deH4cker on 11/22/13.
Copyright (c) 2013 C0deH4cker. All rights reserved.
*/
#ifndef SC_SUPERCALC_H
#define SC_SUPERCALC_H
#include <stdio.h>
#include <stdbool.h>
typedef struct SuperCalc SuperCalc;
#include "value.h"
#include "context.h"
#include "generic.h"
ASSUME_NONNULL_BEGIN
struct SuperCalc {
OWNED Context* ctx;
bool interactive;
uint8_t importDepth;
};
RETURNS_OWNED SuperCalc* SuperCalc_new(void);
void SuperCalc_free(CONSUMED SuperCalc* _Nullable sc);
void SuperCalc_run(UNOWNED SuperCalc* sc);
RETURNS_OWNED Error* SuperCalc_importFile(UNOWNED SuperCalc* sc, const char* filename);
RETURNS_OWNED Value* _Nullable SuperCalc_runLine(UNOWNED SuperCalc* sc, UNOWNED char* str, VERBOSITY v);
ASSUME_NONNULL_END
#endif /* SC_SUPERCALC_H */