/* TODO
* Implement logical operators: and, or, not
- * Implement arrays and array access
* Implement module scoped identifiers
* Implement strings types
* Implement records and record access
{
do
{
-// if (matches(p, IDENT))
-// {
-// Item right = { 0 };
-// char* text = expect_text(p, IDENT);
-// if (accept(p, '='))
-// {
-// Symbol* sym = symbol_get(p, SYM_VAR, text);
-// init_item(item, sym);
-// item->imm.s = sym->name;
-//
-// expression(p, &right);
-// check_types(p, item, &right);
-// codegen_store(p, item, &right);
-// }
-// else
-// {
-// /* TODO: add function calls and other complex stuff */
-// error(p, "expected assignment");
-// }
-// expect(p, ';');
-// }
-// else
if (matches(p, IF))
{
expect(p, IF);
int nsyms = 0;
Symbol* first = NULL;
Symbol* sym = NULL;
-// Symbol* type = NULL;
char* name = NULL;
bool export = false;
expect(p, ':');
type(p, &base_type);
-// name = expect_text(p, IDENT);
-// type = symbol_get(p, SYM_TYPE, name);
-
/* apply the type to the newly created symbols */
for (int i = 0; i < nsyms; i++)
{