shithub: scc

ref: 08c42cdfaea4d0cc3bf0bc00ee3e7cf2e5a9664a
dir: /stmt.c/

View raw version

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

#include "cc.h"

void
compound(void)
{
	extern void decl(void);
	extern Node *expr(void);

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