blob: 83dd5dc7c2f20ed0600b58464973582f7f000983 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
/*
* Copyright (c) 2021, the SerenityOS developers.
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <LibCore/File.h>
#include <LibCpp/Preprocessor.h>
int main(int, char**)
{
auto file = Core::File::construct("/home/anon/Source/little/other.h");
if (!file->open(Core::IODevice::ReadOnly)) {
perror("open");
exit(1);
}
auto content = file->read_all();
Cpp::Preprocessor cpp("other.h", StringView { content });
dbgln("{}", cpp.process());
}
|