Commit 6b9444e1 authored by Roberto Raggi's avatar Roberto Raggi
Browse files

Simple manual test for the preprocessor.

parent 370e3051
#include <PreprocessorEnvironment.h>
#include <PreprocessorClient.h>
#include <pp.h>
#include <QFile>
#include <iostream>
using namespace CPlusPlus;
int main()
Client *client = 0;
Environment env;
Preprocessor preprocess(client, &env);
QFile in;
if (!, QFile::ReadOnly))
return 0;
const QByteArray source = in.readAll();
const QByteArray preprocessedCode = preprocess("<stdin>", source);
std::cout << preprocessedCode.constData();
return 0;
QT = core
macx:CONFIG -= app_bundle
# Input
SOURCES += main.cpp
unix {
debug:OBJECTS_DIR = $${OUT_PWD}/.obj/debug-shared
release:OBJECTS_DIR = $${OUT_PWD}/.obj/release-shared
debug:MOC_DIR = $${OUT_PWD}/.moc/debug-shared
release:MOC_DIR = $${OUT_PWD}/.moc/release-shared
RCC_DIR = $${OUT_PWD}/.rcc/
UI_DIR = $${OUT_PWD}/.uic/
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment