diff options
| author | Kai Stevenson <kai@kaistevenson.com> | 2023-06-13 04:10:21 -0700 |
|---|---|---|
| committer | Kai Stevenson <kai@kaistevenson.com> | 2023-06-13 04:10:21 -0700 |
| commit | f32a19fee2a3016b6393272dc2c054ff02e63b7f (patch) | |
| tree | 57569371835e6ecf2c0e110da2405484b1e27ec3 /parse.h | |
| parent | 2f7ac38cca2ebab41b8adb76b69e0949eeae488d (diff) | |
added scoping; probably doesn't work
Diffstat (limited to 'parse.h')
| -rw-r--r-- | parse.h | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -1,16 +1,22 @@ #ifndef PARSE #define PARSE #include "proposition.h" +typedef struct Scope { + int id; + int depth; + struct Scope* parent; +} scope_t; +scope_t init_scope(int id, int depth, scope_t* parent); typedef struct Line { - int aLevel; + scope_t scope; prop_t proposition; just_t justification; } line_t; +line_t init_line(scope_t scope, prop_t proposition, just_t justification); typedef struct LineSet { line_t* lines; int count; } lineSet_t; -line_t init_line(int aLevel, prop_t proposition, just_t justification); lineSet_t init_lineset(line_t* lines, int count); int count_lines(char* content); lineSet_t parse_lines(char* content, int lineCount); |
