shithub: scc

ref: 3134fea3e8d461d77eb23d8f91291e985f28d4ba
dir: /stmt.c/

View raw version

#include <stdint.h>

#include "symbol.h"
#include "tokens.h"


void
compound(void)
{
	extern struct node *expr(void);
	extern void decl(void);

	expect('{');
	while (!accept('}')) {
		switch (yytoken) {
		case TYPE: case SCLASS: case TQUALIFIER:
			decl();
			break;
		default:
			eval(expr());
		}
		expect(';');
	}
}