shithub: scc

ref: d1c3a0d77670defbdac8bc39a5182170934d8063
dir: /stmt.c/

View raw version

#include <stddef.h>
#include <stdint.h>

#include "cc.h"

void
compound(void)
{
	extern void decl(void);

	expect('{');
	while (!accept('}')) {
		switch (yytoken) {
		case TYPE: case SCLASS: case TQUALIFIER:
			decl();
			break;
		default:
			expr();
			/* TODO: Evaluate the expression here */
		}
		expect(';');
	}
}