diff options
| author | Amlal El Mahrouss <amlal@nekernel.org> | 2025-05-02 19:38:33 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-05-02 19:38:33 +0200 |
| commit | 87979899ce833ca477bb563b84e3698224119dab (patch) | |
| tree | df67a0724de4c76ce594222747220c233c3bc7f5 /tools/cppdrv.cc | |
| parent | 3afc481dc64a07fe7fcaff9ce7a12a492c3ec8e7 (diff) | |
| parent | fb12b9730d78052f5cafbd84fbc9a830a22cec17 (diff) | |
Merge pull request #4 from nekernel-org/dev
0.0.1
Diffstat (limited to 'tools/cppdrv.cc')
| -rw-r--r-- | tools/cppdrv.cc | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/tools/cppdrv.cc b/tools/cppdrv.cc new file mode 100644 index 0000000..7adfd0b --- /dev/null +++ b/tools/cppdrv.cc @@ -0,0 +1,27 @@ +/* ------------------------------------------- + + Copyright (C) 2024-2025 Amlal EL Mahrous, all rights reserved + +------------------------------------------- */ + +/// @file cxxdrv.cc +/// @brief NE frontend preprocessor. + +#include <LibCompiler/Defines.h> +#include <LibCompiler/ErrorID.h> +#include <LibCompiler/Version.h> +#include <cstring> +#include <iostream> +#include <vector> + +LC_IMPORT_C int CPlusPlusPreprocessorMain(int argc, char const* argv[]); + +int main(int argc, char const* argv[]) { + if (auto code = CPlusPlusPreprocessorMain(2, argv); code > 0) { + std::printf("cppdrv: preprocessor exited with code %i.\n", code); + + return LIBCOMPILER_EXEC_ERROR; + } + + return LIBCOMPILER_SUCCESS; +}
\ No newline at end of file |
