shithub: scc

ref: 2fc8ee279b55d1da274fc17ef6ab73efcdd1c206
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(';');
	}
}