Type checking in place

This commit is contained in:
2022-08-15 03:52:44 +01:00
parent 8d12db7dbe
commit 6b834ca6d1
4 changed files with 76 additions and 9 deletions

View File

@@ -1,5 +1,6 @@
#pragma once
#include "literal_array.h"
#include "literal_dictionary.h"
typedef struct Scope {
@@ -17,6 +18,6 @@ bool declareScopeVariable(Scope* scope, Literal key, Literal type);
bool isDelcaredScopeVariable(Scope* scope, Literal key);
//return false if undefined
bool setScopeVariable(Scope* scope, Literal key, Literal value);
bool setScopeVariable(Scope* scope, Literal key, Literal value, bool constCheck);
bool getScopeVariable(Scope* scope, Literal key, Literal* value);