shithub: scc

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