beginnings of REPL
[muddle-interpreter.git] / src / read.h
1 /*
2 Copyright (C) 2017 Keziah Wesley
3
4 You can redistribute and/or modify this file under the terms of the
5 GNU Affero General Public License as published by the Free Software
6 Foundation, either version 3 of the License, or (at your option) any
7 later version.
8
9 This file is distributed in the hope that it will be useful, but
10 WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 Affero General Public License for more details.
13
14 You should have received a copy of the GNU Affero General Public
15 License along with this file. If not, see
16 <http://www.gnu.org/licenses/>.
17 */
18
19 #ifndef READ_H
20 #define READ_H
21
22 #include <stdint.h>
23
24 typedef union object object;
25 typedef struct
26 {
27   object *pos;
28   uint32_t framelen;
29   uint32_t _pad;
30 } reader_stack;
31
32 // TODO: hide this, export higher-level interface
33 const char *read_token (const char *p, reader_stack * st);
34
35 #endif // READ_H