This repository has been archived on 2024-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
pacciani/emit.c
Stefano Sanfilippo 40845c011b Cleanups.
1. move emit() to separate file.
2. move main to .cpp
3. use "namespace" for parser and lexer.
4. remove Type.h
2014-11-27 19:59:48 +01:00

19 lines
317 B
C

#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#define _(...) emit(__VA_ARGS__, NULL);
void emit(const char *text, ...) {
va_list args;
va_start(args, text);
const char *t;
for (t = text; t != NULL; t = va_arg(args, const char *)) {
printf("%s", t);
}
va_end(args);
}