From f32a19fee2a3016b6393272dc2c054ff02e63b7f Mon Sep 17 00:00:00 2001 From: Kai Stevenson Date: Tue, 13 Jun 2023 04:10:21 -0700 Subject: added scoping; probably doesn't work --- parse.h | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'parse.h') 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); -- cgit v1.3.1