summaryrefslogtreecommitdiff
path: root/parse.h
diff options
context:
space:
mode:
authorKai Stevenson <kai@kaistevenson.com>2023-06-13 04:10:21 -0700
committerKai Stevenson <kai@kaistevenson.com>2023-06-13 04:10:21 -0700
commitf32a19fee2a3016b6393272dc2c054ff02e63b7f (patch)
tree57569371835e6ecf2c0e110da2405484b1e27ec3 /parse.h
parent2f7ac38cca2ebab41b8adb76b69e0949eeae488d (diff)
added scoping; probably doesn't work
Diffstat (limited to 'parse.h')
-rw-r--r--parse.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/parse.h b/parse.h
index 67d7160..84b3613 100644
--- a/parse.h
+++ b/parse.h
@@ -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);