shithub: scc

ref: a8b9e699e5f953f3521cbe2e3e9ad431f307823c
dir: /stmt.c/

View raw version

#include <stdint.h>

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


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

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