summaryrefslogtreecommitdiff
path: root/Userland/Utilities
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Utilities')
-rw-r--r--Userland/Utilities/CMakeLists.txt1
-rw-r--r--Userland/Utilities/cpp-parser.cpp7
2 files changed, 6 insertions, 2 deletions
diff --git a/Userland/Utilities/CMakeLists.txt b/Userland/Utilities/CMakeLists.txt
index 9b183ff85f..c61fdedd42 100644
--- a/Userland/Utilities/CMakeLists.txt
+++ b/Userland/Utilities/CMakeLists.txt
@@ -74,6 +74,7 @@ target_link_libraries(config LibConfig)
target_link_libraries(copy LibGUI LibMain)
target_link_libraries(cp LibMain)
target_link_libraries(cpp-lexer LibMain)
+target_link_libraries(cpp-parser LibMain)
target_link_libraries(diff LibDiff)
target_link_libraries(disasm LibX86)
target_link_libraries(dmesg LibMain)
diff --git a/Userland/Utilities/cpp-parser.cpp b/Userland/Utilities/cpp-parser.cpp
index 89ca66d8b6..65f52242ed 100644
--- a/Userland/Utilities/cpp-parser.cpp
+++ b/Userland/Utilities/cpp-parser.cpp
@@ -7,15 +7,16 @@
#include <LibCore/ArgsParser.h>
#include <LibCore/File.h>
#include <LibCpp/Parser.h>
+#include <LibMain/Main.h>
-int main(int argc, char** argv)
+ErrorOr<int> serenity_main(Main::Arguments arguments)
{
Core::ArgsParser args_parser;
const char* path = nullptr;
bool tokens_mode = false;
args_parser.add_option(tokens_mode, "Print Tokens", "tokens", 'T');
args_parser.add_positional_argument(path, "Cpp File", "cpp-file", Core::ArgsParser::Required::No);
- args_parser.parse(argc, argv);
+ args_parser.parse(arguments);
if (!path)
path = "Source/little/main.cpp";
@@ -43,4 +44,6 @@ int main(int argc, char** argv)
}
root->dump();
+
+ return 0;
}